docker-registry v2.2.0 S3 config not overwritten
I’m having an issue trying to start a docker registry service with S3 backend. Its acting very strangely. If I launch like this:
docker run -d -e SETTINGS_FLAVOR=s3 -e AWS_BUCKET=sotic-docker-registry -e STORAGE_PATH=/registry -e AWS_REGION=eu-west-1 -e AWS_KEY=***** -e AWS_SECRET=***** -e STORAGE_REDIRECT=true -e SEARCH_BACKEND=sqlalchemy -p 5000:5000 registry:2.2.0
As suggested by other topics on here, I don’t get an overridden config file.
Running docker exec on the container and looking at the /etc/docker/registry/config.yml seems to suggest I’m still using the local storage.
root@5727b353e734:/# vi /etc/docker/registry/config.yml version: 0.1 log: fields: service: registry storage: cache: blobdescriptor: inmemory filesystem: rootdirectory: /var/lib/registry http: addr: :5000 headers: X-Content-Type-Options: [nosniff] health: storagedriver: enabled: true interval: 10s threshold: 3
One Solution collect form web for “docker-registry v2.2.0 S3 config not overwritten”
It seems the /etc/docker/registry/config.json file never gets touched in the default image. None of the overrides seem to work.
The answer is to build your own registry image and ADD a config.json with the required components in it.