Skip to content
Search

Container Registry

lastmod 2025-06-19created 2023-04-195 edits

Categories

Cloud services

  • TreeScale - unlimited, but seems buggy?
  • Canister - 20 repositories
  • GitLab
  • Docker Hub - One private repo/image spot for free
  • GitHub - was it 500M? I don't remember
  • Three Scale - Very generous free tier 50GB of space, 500 Pulls a month etc..
  • Canister - 20 private repos with almost no limits on free tier
  • Code Fresh - Free tier for developers

Configuration

If you want to pass settings as environment variables, pass them in the format REGISTRY_{variable}_{sub}_{sub}.... For example,

storage:
  filesystem:
    rootdirectory: /var/lib/registry

This can be applied as an environment variable like REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/somewhere.

Private repo example

To start using Docker in earnest, we needed to build a Private Docker Registry for use within the company. Installing Docker Registry 2.0 on an EC2 server, using S3 as storage, is easy with the following command.

docker run -d -p 5000:5000 --restart=always --name docker-registry \
  -v /etc/letsencrypt:/certs \
  -v /docker/docker-registry:/var/lib/registry \
  -e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/live/docker-registry.zwolf.org/fullchain.pem \
  -e REGISTRY_HTTP_TLS_KEY=/certs/live/docker-registry.zwolf.org/privkey.pem \
  -e REGISTRY_STORAGE=s3 \
  -e REGISTRY_STORAGE_S3_BUCKET=docker-registry \
  -e REGISTRY_STORAGE_S3_ACCESSKEY=<S3_ACCESSKEY> \
  -e REGISTRY_STORAGE_S3_SECRETKEY=<S3_SECRETKEY> \
  -e REGISTRY_STORAGE_S3_REGION=ap-northeast-2 \
  registry:2

Using MinIO, which supports S3, lets you integrate with your own server.

with MinIO

Troubleshooting

x509: certificate signed by unknown authority

See OpenSSL.

unexpected EOF

Supposedly it was solved by changing the chunksize parameter... but it doesn't work for me? <syntaxhighlight lang="yaml> storage:

s3:
accesskey: SOM3AWSACCESSK3Y
secretkey: **********************************
region: us-east-1
bucket: some-bucket
encrypt: false
secure: true
v4auth: true
chunksize: 51214400

</syntaxhighlight>

See also

Favorite site

author Zer0 sitemap