-
Notifications
You must be signed in to change notification settings - Fork 87
Reduce layers / use Docker CLI to reduce img size #27
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
base: master
Are you sure you want to change the base?
Conversation
I believe the image size can be reduced even more by consolidating the other layers into one layer, but then the code is most likly not so readable anymore and it only saves you a few MB. |
+1 to PR About remove docker cli..., should or could container be able to manage remote instances? In that case cli is mandatory |
@varhub I believe remote access is not required as the backup volumes need to be local as well. At least I cannot think of another possibility right now. |
Hello @tekgator , Im only trying to be wide (even it makes no sense). On the other hand, halving again container size is great. Even if this could be viable, without locallan or vpn or ipv6 will not be feasible. What do you think? |
@varhub You're correct, but still I see another problem. Even though lets says remote backup (nfs) is a topic the image by itself does not support remote docker control yet. Here we would need the ability to pass IP and port to the container. Most likly remote control is also secured by username/pass or even via SSL certificate. In this case it needs to be passed to the container as well somehow. Until this is implemented I think it would be save to remove the Docker CLI from the image and just mount it from the host system via |
Indeed. Thanks @tekgator for dive me in. |
@tekgator the 2 PR's referenced above have been merged. Is there something here that's not covered there? |
@jareware: I guess it is fine, even though my PR utilized the package manager instead of the docker install script. Not sure if this is any better. As mentioned I think the Docker CLI could be removed as well as there is no need for it. This would bring down image even further. From my point of view it can be closed, just don't understand how this overlap happened in the first place. |
Hi Jarno,
I reduzed the image size by more than 50% (411MB vs 857MB) by reducing layers and installing only the Docker CLI.
First step was reducing the amount of layers, this reduced the image to around 600MB. Second step was removing the complete docker installation, so the image size shrinks to around 450 MB.
After adding an apt-clean and removing tmp files the image is finally reduced to 411 MB: