Skip to content

Instantly share code, notes, and snippets.

@t3h2mas
Created April 25, 2017 22:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save t3h2mas/314838a49f876c64e4697d640853da9d to your computer and use it in GitHub Desktop.
Save t3h2mas/314838a49f876c64e4697d640853da9d to your computer and use it in GitHub Desktop.
Deploy registry to Docker Swarm
#!/bin/bash
docker service create --name registry \
-e "REGISTRY_STORAGE=s3" \
-e "REGISTRY_STORAGE_S3_REGION=[S3 REGION]" \
-e "REGISTRY_STORAGE_S3_ACCESSKEY=[ACCESS KEY]" \
-e "REGISTRY_STORAGE_S3_SECRETKEY=[SECRET KEY]" \
-e "REGISTRY_STORAGE_S3_BUCKET=[BUCKET NAME]" \
-e "REGISTRY_STORAGE_S3_ENCRYPT=true" \
--publish 5000:5000 \
registry:2
@t3h2mas
Copy link
Author

t3h2mas commented Apr 25, 2017

TODO: Add restart policy if the default isn't sufficient

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment