-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WiP: parallel builds for erd #175
Conversation
3ac5c1f
to
66142fd
Compare
Signed-off-by: Damien Duportal <[email protected]>
66142fd
to
89fd058
Compare
For a multi-stage build, you need to know very well what you need to copy on: in the most simple case it's a single binary, but there's no limit to the meh (I've build images with natively compiled Ruby gems, nightmare that ...). I don't know enough about the intent of #166 and erd to gauge where we land here. @sapientpants might know more about what the actually required stuff is. |
It seems that cabal does indeed provide a single binary for erd here. At least, with # This part unchanged
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
RUN apk add --no-cache libffi gmp graphviz
COPY --from=erd root/.cabal/bin/erd /bin/ I get this: $ docker run --rm -it adoc-test erd --version
erd-0.2.1.0 UNKNOWN Haven't tested any actual functionality of erd, though. That's a lot smaller: If that would help even more, they document how to build a statically-linked binary; that's beyond my involvement with Haskell tooling, though. :'D FWIW, the largest intermediate layer I get from this build is over 3GB large. (And the build runs for a loooong time.) Wow. Anyway, point is @sapientpants did do something to drop over half of that. :) |
As a starting point, the native APK package for |
@dduportal Do you have enough information to work on this? I'll note that multi-stage builds might also be able to reduce the size impact of building Ruby and Python dependencies, which currently happens with |
Hello @reitzig , even though I have all the informations, my bandwidth is full until mid-March so I won't be able to work on this topic until then. Please feel free to open a PR if you feel ok to contribute, that would be a great help! Thanks a lot for your willingness, time and efforts! |
Cool! Here you go, that should get you started: #184 |
Closing in favor of #184 |
Signed-off-by: Damien Duportal [email protected]