I have a local docker-registry that I'd like to manage with upstart.
I have the following script (in /etc/init/docker-registry.conf):
description "docker registry"
author "me"
start on filesystem and started docker
stop on runlevel [!2345]
respawn
script
/usr/bin/docker.io run -a stdout --rm --name=docker-registry \
-v /var/local/docker-registry:/var/local/docker-registry \
-p 5000:5000 mysite:5000/docker-registry
end script
I can start my docker registry fine with:
sudo start docker-registry
Response: docker-registry start/running, process 8620
Check to confirm its running?
sudo status docker-registry
Response: docker-registry start/running, process 8620
Trying to stop it with:
sudo stop docker-registry
Response: docker-registry stop/waiting
However, it doesn't actually stop. The process is still alive, the container is running, and it's still functioning perfectly
It does stop perfectly with:
docker stop docker-registry
I've tried adding this to the upstart script:
post-stop script
docker stop docker-registry
end script
But it just returns: stop: Job failed while stopping
--rm
, and upstart still fails to stop my container.docker stop docker-registry
still works though. – Angio