You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In your Dockerfile here "ci/release-image/Dockerfile", your layers are not optimised. You copy deb file with a COPY (perhaps you could even copy both the arm64 deb file and the amd64 deb file because your copy is using a very generic wilcard) in a layer and you install and delete file(s) in another layer. So the resulted image file is not optimised.
But this type of solution is not directly applicable I think because of your CI that intend to build package outside docker... And in your docker build step, install this package from the host which was just built.
The best solution is to made it available like I did and download with curl, but I think you need to modify some things on your scripts, I did'nt understand all the logic of your scripts...
Alternatives I don't like :
One which involve something else named buildkit to build the image, so don't like it :
Perhaps, there's also the possibility to use the "--squash" option during build, but does'nt really like it also.
So definitively something to fix, but don't know the good way for you... But the size of the deb file is so big, so you probably need to do something about it !
The text was updated successfully, but these errors were encountered:
In your Dockerfile here "ci/release-image/Dockerfile", your layers are not optimised. You copy deb file with a COPY (perhaps you could even copy both the arm64 deb file and the amd64 deb file because your copy is using a very generic wilcard) in a layer and you install and delete file(s) in another layer. So the resulted image file is not optimised.
If you does'nt understand my explanation, another one here :
https://forums.docker.com/t/copy-a-file-that-doesnt-need-to-be-in-the-final-image/12627/4
To fix it in my build, I did this :
RUN cd /tmp && curl -L -O https://github.com/cdr/code-server/releases/download/
v3.7.4/code-server_3.7.4_amd64.deb && dpkg -i /tmp/code-server*$(dpkg --print-architecture).deb && rm /tmp/code-server*.deb
But this type of solution is not directly applicable I think because of your CI that intend to build package outside docker... And in your docker build step, install this package from the host which was just built.
The best solution is to made it available like I did and download with curl, but I think you need to modify some things on your scripts, I did'nt understand all the logic of your scripts...
Alternatives I don't like :
One which involve something else named buildkit to build the image, so don't like it :
https://docs.docker.com/engine/reference/builder/#buildkit
https://stackoverflow.com/questions/26306059/docker-in-dockerfile-copy-files-temporarily-but-not-for-final-image
Perhaps, there's also the possibility to use the "--squash" option during build, but does'nt really like it also.
So definitively something to fix, but don't know the good way for you... But the size of the deb file is so big, so you probably need to do something about it !
The text was updated successfully, but these errors were encountered: