-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Docker: clean up after setup #59
Comments
However, keep in mind that this image is a dev/build image. You should only use it for building once in your CI system. FROM ubuntu:devel as builder
# ... setup-cpp
# then build your app (e.g. using CMake)
FROM gcr.io/distroless/cc
COPY --from=builder /build/your_binary /
COPY --from=builder /build/your_dll_files /
CMD ["./your_binary"]
|
In the meantime, remove the extra llvm flags like |
Yes I agree, |
0.13.2 is released that fixes this issue |
Hello,
I'm using setup-cpp in my Dockerfile and saw the generated Layer is big (when installing a lot of tools).
Problem
16.3 GB
(it's hard to upload something this big to docker hub)
Dockerfile
I add
rm -rf /tmp/* && apt-get clean && rm -rf /var/lib/apt/lists/*
for clean up and got: 14.3 GBRUN ./setup_cpp_linux --compiler llvm \ --cmake true --ninja true --ccache true \ --cppcheck true --clangtidy true --clangformat true \ --gcovr true --conan true --doxygen true && \ rm -rf /tmp/* && apt-get clean && rm -rf /var/lib/apt/lists/*
(cleaning up the /tmp-folder seem to a bit help ?)
different setups
Readme example
RUN ./setup_cpp_linux --compiler llvm --cmake true --ninja true --ccache true --vcpkg true
gcc + conan
RUN ./setup_cpp_linux --compiler gcc --cmake true --ninja true --ccache true --conan true
Layer Size: 303.4 MB
with clang tools
idk why but the clang-tools seems huge after setup.
RUN ./setup_cpp_linux --compiler llvm --cmake true --ninja true --ccache true --conan true --cppcheck true --clangtidy true --clangformat true
Layer Size: 16 GB
with clangtidy
RUN ./setup_cpp_linux --compiler llvm --cmake true --ninja true --ccache true --clangtidy true
Layer Size: 11 GB
with clangformat
RUN ./setup_cpp_linux --compiler llvm --cmake true --ninja true --ccache true --clangformat true
Layer Size: 11 GB
My old setup
My old version with only apt-get setup was 1.1 GB (Layer Size)
Directory sizes in (docker) image
Output
Seems like llvm, clangtidy and clangformat are the same.
when installing llvm, and clang-tools,
clang+llvm-14.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz
gets downloaded multiple times. (and extract into /root/llvm, /root/clang... ?)The text was updated successfully, but these errors were encountered: