Docker Private Registry for CoreOS
2.8K
This uses the registry as a base and adds basic auth via Nginx. Note that you should provide your own SSL (example via a load balancer)
To run a private registry, enter this in your unit file.
docker run --rm \
--name registry \
-p 8085:80
-e SERVER_NAME="registry.example.com"\
-e SETTINGS_FLAVOR=local \
-v /mnt/registry:/tmp/registry \
noua/docker-private-registry
To add users, you must add the htpasswd hash to etcd like this:
docker exec -it private-registry bash
and then run
curl -L -v -X PUT http://172.17.42.1:4000/v2/keys/registry/users/$username -d value=$(htpasswd -nb $username $password)
REGISTRY_NAME: Custom name for registry (used when prompted for auth)To run with Amazon S3 as the backing store, you will need the following environment variables:
AWS_ACCESS_KEY_ID: Your AWS Access Key ID (make sure it has S3 access)AWS_SECRET_KEY: Your AWS Secret KeyS3_BUCKET: Your S3 bucket to store imagesSETTINGS_FLAVOR: This must be set to prodContent type
Image
Digest
sha256:06490f091…
Size
183.6 MB
Last updated
almost 11 years ago
docker pull noua/docker-private-registry