diff options
Diffstat (limited to 'import-layers/meta-virtualization/recipes-containers/docker/files/docker-registry.service')
-rw-r--r-- | import-layers/meta-virtualization/recipes-containers/docker/files/docker-registry.service | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/import-layers/meta-virtualization/recipes-containers/docker/files/docker-registry.service b/import-layers/meta-virtualization/recipes-containers/docker/files/docker-registry.service new file mode 100644 index 000000000..7b4bc468f --- /dev/null +++ b/import-layers/meta-virtualization/recipes-containers/docker/files/docker-registry.service @@ -0,0 +1,19 @@ +[Unit] +Description=docker private registry service +After=docker.service + +[Service] +ExecStartPre=-/usr/bin/docker kill registry +ExecStartPre=-/usr/bin/docker rm registry +ExecStart=/usr/bin/docker run --name registry -v /mirror/registry:/tmp/ -p 5000:5000 \ + -e "STANDALONE=true" \ + -e "MIRROR_SOURCE=https://registry-1.docker.io" \ + -e "MIRROR_SOURCE_INDEX=https://index.docker.io" \ + -e "SETTINGS_FLAVOR=local" \ + registry +ExecStop=-/usr/bin/docker stop registry +Restart=always +RestartSec=10s + +[Install] +WantedBy=multi-user.target |