Created
February 9, 2017 17:41
-
-
Save choopooly/43f8913ad7d016b0e3216a5214c84446 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
description "Docker container for registry" | |
start on filesystem and started docker | |
stop on runlevel [06] | |
respawn | |
script | |
exec docker run \ | |
-e REGISTRY_LOG_LEVEL=warn \ | |
-e REGISTRY_STORAGE=s3 \ | |
-e REGISTRY_STORAGE_S3_REGION=us-west-1 \ | |
-e REGISTRY_STORAGE_S3_BUCKET=my-bucket \ | |
-e REGISTRY_STORAGE_S3_ROOTDIRECTORY=my-folder/my-subfolder/my-sub-subfolder \ | |
--log-driver=syslog \ | |
-p 5000:5000 \ | |
--rm \ | |
--name=registry \ | |
registry:2 None | |
end script | |
pre-stop script | |
/usr/bin/docker stop \ | |
registry | |
/usr/bin/docker rm registry | |
end script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment