-
Notifications
You must be signed in to change notification settings - Fork 364
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
optimize size of images #1
Comments
look at my Dockerfile https://github.com/jeremy-derusse/docker-mailcatcher/blob/master/Dockerfile
|
Thanks @jeremy-derusse. You're absolutely right. I will create a shell script for mailcatcher as well. This step should have the same effect as your described proposal. Closing the issue now. Thanks for the heads up! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Because docker works with layer and it creates one layer per action on your DockerFile, you should combine actions in the same action to really reduce the size.
When you run
The layer #1 will contains the packages
build-essential
,ruby-dev
andlibsqlite3-dev
then the size of all layers (the size of the image) will not be optilmized.A better way to reduce size of your images:
In the same action you install and uninstall builds packages. So neither layer will contains those packages.
The text was updated successfully, but these errors were encountered: