-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
57 lines (44 loc) · 1.51 KB
/
Dockerfile
File metadata and controls
57 lines (44 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
FROM debian:bookworm-slim
# Install dependencies
RUN apt-get update && apt-get install -y \
curl git make unzip autoconf build-essential libssl-dev \
libncurses-dev wget ca-certificates \
python3 python3-numpy python3-pandas python3-matplotlib \
locales \
&& sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen \
&& locale-gen \
&& update-locale LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
ENV LANG=en_US.UTF-8
ENV LC_ALL=en_US.UTF-8
ENV LANGUAGE=en_US.UTF-8
# Install ASDF
ENV ASDF_DIR=/opt/asdf
RUN git clone https://github.com/asdf-vm/asdf.git $ASDF_DIR --branch v0.14.0
ENV PATH="$ASDF_DIR/bin:$ASDF_DIR/shims:$PATH"
# Install Erlang and Elixir
RUN . $ASDF_DIR/asdf.sh \
&& asdf plugin add erlang https://github.com/asdf-vm/asdf-erlang.git \
&& asdf plugin add elixir https://github.com/asdf-vm/asdf-elixir.git
RUN . $ASDF_DIR/asdf.sh \
&& asdf install erlang 26.2.2 \
&& asdf install elixir 1.14
RUN . $ASDF_DIR/asdf.sh \
&& asdf global erlang 26.2.2 \
&& asdf global elixir 1.14
# Create app directory
WORKDIR /app
COPY . .
# Precompile deps and build escript
RUN . $ASDF_DIR/asdf.sh && make
RUN echo "#!/bin/bash" > /usr/bin/asdf-run \
&& echo "source /opt/asdf/asdf.sh" >> /usr/bin/asdf-run \
&& echo 'exec "$@"' >> /usr/bin/asdf-run \
&& chmod +x /usr/bin/asdf-run
RUN echo ". /opt/asdf/asdf.sh" >> $HOME/.bashrc
# Create output directory
RUN mkdir -p -m 777 output
VOLUME ["output"]
ENV TERM=xterm
ENTRYPOINT ["/usr/bin/asdf-run"]