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.
docker run complains file not found
Keep docker-compose container running after ENTRYPOINT
Docker: access to VPN domain from docker
Where to find more explicit errors given container error status codes?
Get host name/ip for Docker network
EOF Alternative for calling ArangoDB query on Octave
why is the status Exited (-1) when docker stop some container
What benefits does Docker Compose have over Docker Swarm and Docker Stack?
Get YAML for deployed Kubernetes services?
Speed up Gitlab CI reusing docker machine for stages
Run Fluentd Docker Image as Non Root
Setup Docker Swarm [on hold]
Running commands in a Docker file
Output of `tail -f` at the end of a docker CMD is not showing
Docker in a Parallels' Virtual Windows 10 Pro Machine
multiple docker files in a directory