-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile.dev
44 lines (35 loc) · 1.06 KB
/
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
43
44
FROM surnet/alpine-wkhtmltopdf:3.19.0-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 \
libssl3 \
ca-certificates \
fontconfig \
freetype \
ttf-droid \
ttf-freefont \
ttf-liberation \
# more fonts
;
# wkhtmltopdf copy bins from ext image
COPY --from=wkhtmltopdf /bin/wkhtmltopdf /bin/wkhtmltopdf
COPY --from=wkhtmltopdf /bin/wkhtmltoimage /bin/wkhtmltoimage
COPY --from=wkhtmltopdf /bin/libwkhtmltox* /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" ]