docker run does not work from cronjob
I got a cronjob set up on an AWS EC2 instance which is supposed to start a docker container: 15 0 * * * docker run -e ENVIRONMENT=dev myrepo/my-image-name I can see in the cron log it's attempting to run the job, but the container does not get run. Tried with sudo, still does not run. What could be reason for that?
cron does not know about environment variables, e.g. $PATH - so it cannot find docker to run. Should specify full path: /usr/bin/docker, like this: 15 0 * * * /usr/bin/docker run -e ENVIRONMENT=dev myrepo/my-image-name To those who wonder how to find where the docker lives: run which docker in your console.
Expose urls for Docker compose
How to get the container Id of the running container using docker-java?
Docker exit code 125 and 'Device is Busy' error
Unable to create a thinpool in Debian
How to run docker image produced by VS 2017
Spring Boot in Docker
Copy a folder into a mounted volume within a Docker Container
Run image in docker
cron task in docker container not being executed
Use Container Metrics from Prometheus
Docker precheck error “code E_FAIL(0x80004005)”
Is it possible to change the read-only/read-write status of a docker mount at runtime?
Unable to start any container when Volumes are enabled Docker Toolbox
docker-compose up recreates container when config is unchanged
Why does docker-compose not lookup the IP address from the MySQL container?
How to mount volume from container to host in Docker?