-
Notifications
You must be signed in to change notification settings - Fork 11k
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
Using Slim to minify docker image #1550
Comments
Maybe we could also ditch docker hub and migrate to using GitHub Container registry in the same step? I've seen some other people implementing this like here. |
Does the Github Container registry solves any problem? What does it offer compared to dockerhub? Currently, Dockerhub compresses our image from 1.3 GB to 500MB. Does it compress the image? |
First you should use Then build an optimized version using:
Then, tag the image as slim:
Image size is reduced to 188 MBs. |
Oh I didn't know about the compressing feature. I suggested simply because we use GitHub already, so for keeping it all up in one provider. Also Docker did a terrible job communicating changes lately, although they reverted their decisions. |
The slim version is now available at this URL:
Test it if you can. You can also change the image name in |
You can also use a one-liner to use the slim image:
|
Currently throwing an error @pourmand1376:
|
Let's dig it. It is far more problematic than I thought. Just, let this be open for a month or two. Perhaps, someone expert on docker does something. Otherwise, 400MB is not that much and it is okay for now. |
Maybe the only thing missing here is an updated docker image. The
|
That's true. Most probably there is an issue with a dependency or something. However, It can not be updated manually. It should be updated automatically. As far as I know, there isn't any automatic way of using docker-slim. |
I have implemented docker-slim on github actions. However, it is not working very good (no error). |
Can we close this issue @pourmand1376? |
Yes. This is finished. One thing is still left to answer. When should we make this slim version the default version? As I see, It is basically the same but less in size. However, there may be some unpredicted issues. |
Slim says that it can minify docker images up to 30x. I should experiment to see if it works well on our docker images.
The text was updated successfully, but these errors were encountered: