forked from thewca/wca-live
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.dev
32 lines (24 loc) · 925 Bytes
/
Dockerfile.dev
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
ARG ELIXIR_VERSION=1.14.2
ARG OTP_VERSION=25.2.3
ARG DEBIAN_VERSION=bullseye-20230202-slim
ARG IMAGE="hexpm/elixir:${ELIXIR_VERSION}-erlang-${OTP_VERSION}-debian-${DEBIAN_VERSION}"
FROM ${IMAGE}
# Install build dependencies
RUN apt-get update -y && apt-get install -y build-essential git && \
apt-get install -y curl && \
curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
apt-get install -y nodejs && \
apt-get clean && rm -f /var/lib/apt/lists/*_*
# Install runtime dependencies
RUN apt-get update -y && \
apt-get install -y libstdc++6 openssl libncurses5 locales \
# PDF generation
wkhtmltopdf fonts-freefont-ttf
ENV HOME=/home/app
# Create home dir explicitly, in case someone runs with `--user`
RUN mkdir $HOME && chmod 777 $HOME
# Install hex and rebar
RUN mix local.hex --force && \
mix local.rebar --force
WORKDIR /app
CMD [ "sh", "-c", "mix setup; mix phx.server" ]