Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save charlesmarshall/4a20a1e34a9cc8f34ceb to your computer and use it in GitHub Desktop.
Save charlesmarshall/4a20a1e34a9cc8f34ceb to your computer and use it in GitHub Desktop.
CoreOS Docker registry as a service
[Unit]
Description=Docker registry
After=etcd.service
After=docker.service
[Service]
ExecStop=/usr/bin/bash -l -c "docker stop registry ;"
ExecStart=/usr/bin/bash -l -c "docker pull registry:latest ; docker run --rm --name registry -p 5000:5000 registry ;"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment