apk add docker-cli instead of docker.#4
apk add docker-cli instead of docker.#4rcdailey merged 1 commit intorcdailey:masterfrom Clewsy:testing_docker-cli
Conversation
|
I'm not familiar with EDIT: Looks like it's just the docker client, whereas the docker package contains the daemon which we don't need for my image. Is that the case? |
|
Yes! When you add docker, docker-cli is one of it's dependencies. The advantage of just installing docker-cli is that it won't install un-needed dependencies (e.g. docker-engine which requires containerd as you noted), thus reducing total image size. An alternative could be to change the base image to alpinelinux/docker-cli (https://hub.docker.com/r/alpinelinux/docker-cli) - I think the end result should be the same. |
|
Can you describe any testing you have done with your change? Specifically did you look at logs to make sure that the cron tasks are still executed? Thanks again. |
|
That's exactly how I tested it. I left "docker-compose logs -f" running and observed "> Running Script: run-cron-php.sh > Done" every 5 minutes as per my docker-compose.yml configuration. |
|
Thanks for the improvement. I'll go ahead and get it merged. I did look into Thanks again for your contribution. |
|
Great! I agree with your comments about staying with the standard alpine image, I went the same way with my own project. Thanks for the great image. |
Hello rcdailey, I'm a fan of your nextcloud-cronjob image and have been using it for the better part of a year for my own nextcloud deployment.
In developing my own container image (for simplifying/automating nextcloud data and database backups) I learned that for my purposes I can "apk add docker-cli" instead of "apk add docker".
I think this could be of benefit for nextcloud-cronjob. As far as I can tell, the only reason to add docker is to use docker exec to run the cron.php script.
I have tested this change and it appears to run fine. The benefit on my system is an image reduction from 324MB down to 83MB.
This is my first pull request so I'd be greatful for any feedback!