Skip to content

Commit

Permalink
WiP: parallel builds
Browse files Browse the repository at this point in the history
Signed-off-by: Damien Duportal <[email protected]>
  • Loading branch information
dduportal committed Jan 22, 2021
1 parent a501e6a commit 89fd058
Showing 1 changed file with 21 additions and 18 deletions.
39 changes: 21 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
FROM alpine:3.13
## Multi-stage build to allow parallel building
FROM alpine:3.13 AS erd
RUN apk add --no-cache --virtual .haskellmakedepends \
alpine-sdk \
cabal \
ghc-dev \
ghc \
gmp-dev \
gnupg \
libffi-dev \
linux-headers \
perl-utils \
wget \
xz \
zlib-dev \
&& cabal v2-update \
&& cabal v2-install erd

FROM alpine:3.13 AS main

LABEL MAINTAINERS="Guillaume Scheibel <[email protected]>, Damien DUPORTAL <[email protected]>"

Expand Down Expand Up @@ -91,23 +109,8 @@ RUN apk add --no-cache --virtual .pythonmakedepends \
seqdiag \
&& apk del -r --no-cache .pythonmakedepends

# ERD
RUN apk add --no-cache --virtual .haskellmakedepends \
alpine-sdk \
cabal \
ghc-dev \
ghc \
gmp-dev \
gnupg \
libffi-dev \
linux-headers \
perl-utils \
wget \
xz \
zlib-dev \
&& cabal v2-update \
&& cabal v2-install erd \
&& apk del -r --no-cache .haskellmakedepends
COPY --from=erd /root/.cabal /root/.cabal
COPY --from=erd /opt /opt

WORKDIR /documents
VOLUME /documents
Expand Down

0 comments on commit 89fd058

Please sign in to comment.