Closed FrostyX closed 8 months ago
We can clean a lot of space by
# Remove all build dependencies to have a smaller production image
RUN dnf -y erase java
RUN dnf -y clean all
RUN rm -rf /src/frontend/node_modules/
but this won't help us when pushing because even though the total disk usage showed by ncdu /
is much smaller, the docker image isn't because of the intermediate layers.
We could use multi stage builds: https://docs.docker.com/build/building/multi-stage/
I'll try to look into this tomorrow on Friday, sounds like a solid friday work :))
This is not a release blocker for us but if you find it interesting, then sure, sounds good :-)
It is over 1GB now because it for example contains a lot of Java stuff which are needed only for the compilation but not needed for runtime.