-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile.dev
42 lines (33 loc) · 982 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
33
34
35
36
37
38
39
40
41
42
FROM surnet/alpine-wkhtmltopdf:3.16.2-0.12.6-full as wkhtmltopdf
FROM elixir:1.14-alpine
# Install build dependencies
RUN apk add --no-cache build-base git python3
# Install frontend dependencies
RUN apk add --no-cache nodejs npm
RUN npm install -g npx
# Install pdf generation dependencies
RUN apk add --no-cache \
libstdc++ \
libx11 \
libxrender \
libxext \
libssl1.1 \
ca-certificates \
fontconfig \
freetype \
ttf-droid \
ttf-freefont \
ttf-liberation \
# more fonts
;
# wkhtmltopdf copy bins from ext image
COPY --from=wkhtmltopdf /bin/wkhtmltopdf /bin/libwkhtmltox.so /bin/
# Install imagemagick dependencies
RUN apk add --no-cache file imagemagick
# Install development dependencies
RUN apk add --no-cache inotify-tools
# Install hex + rebar
RUN mix local.hex --force && \
mix local.rebar --force
WORKDIR /app
CMD [ "sh", "-c", "mix setup; mix phx.server" ]