-
Notifications
You must be signed in to change notification settings - Fork 97
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
Dockerfile improvement suggestion (multistage build) + docker-compose #109
Comments
It's great @olblak , thanks for the info. Are you the official maintainer of Mirrorbits now? |
Absolutely not, I made the effort several months ago to move to mirrorbits on the Jenkins project and since it's an open infrastructure project, everything is public. So I have examples to share. I am also behind https://hub.docker.com/orgs/mirrorbits but we DockerHub policy change, it's not really useful anymore IMHO not installing the GeoIP database in the docker image is better since it needs to be updated on a regular basis |
Thanks for the informations, I agree with the fact geoip should be updated regularly, and having it in the docker image, unless some trick with a volume and a scheduler, is not a good idea. |
DockerHub put in place strong limitations on its free tier. So either you pay for it or you apply to the OSS program as explained here |
Please share patches :D |
Hello,
I'd like to suggest improvements for the Dockerfile.
If we use it as is, the size of the resulting docker image is huge (mine was 1.307GB)
So I first made a multistage build
The image was trimmed down to 242MB. Note that I have added nano, $EDITOR and $LANG environment so the mirrorbits edit command works well (vim can be used instead, but is bigger).
But an even smaller image can be produced by using Alpine Linux base.
The resulting image size is 108.1MB
I'm also using a very simple docker-compose.yml file
Then with
docker exec -it mirrorbits_app_1 ash
(or bash instead of ash if using debian base)
we can use all mirrobits commands (with "mirrorbits edit" command working)
edit: added tzdata needed by ftp to work correctly.
The text was updated successfully, but these errors were encountered: