github.com/didip/deis@v1.4.1/deisctl/units/deis-registry.service (about) 1 [Unit] 2 Description=deis-registry 3 4 [Service] 5 EnvironmentFile=/etc/environment 6 TimeoutStartSec=30m 7 ExecStartPre=/bin/sh -c "IMAGE=`/run/deis/bin/get_image /deis/registry` && docker history $IMAGE >/dev/null || docker pull $IMAGE" 8 ExecStartPre=/bin/sh -c "docker inspect deis-registry >/dev/null && docker rm -f deis-registry || true" 9 ExecStart=/bin/sh -c "IMAGE=`/run/deis/bin/get_image /deis/registry` && docker run --name deis-registry --rm -p 5000:5000 -e EXTERNAL_PORT=5000 -e HOST=$COREOS_PRIVATE_IPV4 $IMAGE" 10 ExecStopPost=-/usr/bin/docker rm -f deis-registry 11 Restart=on-failure 12 RestartSec=5 13 14 [Install] 15 WantedBy=multi-user.target 16 17 [X-Fleet] 18 Conflicts=deis-registry@*.service