Private Docket registry V2 not storing images on S3 bucket

I am running a private Docker registry V2 on a DigitalOcean droplet ( on localhost:5000 ) as per the following docker-compose.yml

cache:
image: redis
backend:
image: registry:2
ports:
- 127.0.0.1:5000:5000
links:
- cache
volumes:
- /usr/share/docker-registry/config:/go/src/github.com/docker/distribution/cmd/registry
environment:
SETTINGS_FLAVOR: local
SEARCH_BACKEND: sqlalchemy
CACHE_REDIS_HOST: cache
CACHE_REDIS_PORT: 6379
CACHE_LRU_REDIS_HOST: cache
CACHE_LRU_REDIS_PORT: 6379

I setup the config in /usr/share/docker-registry/config/config.yml ( it may be wrong, it’s my first v2 config)

version: 0.1
log:
level: info
fields:
service: registry
environment: staging
storage:
s3:
accesskey: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
secretkey: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
region: eu-central-1
bucket: harbor.dufour16.net
encrypt: false
secure: true
v4auth: true
chunksize: 5242880
rootdirectory: /registry
cache:
layerinfo: redis
http:
addr: :5000
secret: ZpAedwVDFHK7mkNFFKSP8OQY
debug:
addr: localhost:5001
redis:
addr: localhost:6379
db: 0

On my local host , I build an image
docker build -t localhost:5000/erwin16/simple-app

Then I open an SSH tunnel from my local dev VM machine to the remote registry host
docker-machine ssh dev – ssh -o ‘StrictHostKeyChecking no’ -i /Users/yves/.docker/machine/machines/dev/id_rsa -N -L 5000:localhost:5000 root@harbor.dufour16.net &

then I push the image to remote host via the SSH tunnel
docker@dev:~$ docker push localhost:5000/erwin16/simple-app

The registry is running fine ( tested the /v2/ hook ) however when pushing an image to it, there is no image stored in the bucket …
where am I wrong ? or at least how to check what’s going on ?
it seems related to the volumes mount in the docker-compose.ml … not taken in account …

thanks for your feedback

@erwin16 I believe you also need to add to your docker-compose.yml:
REGISTRY_STORAGE: s3

Looking through the current documentation for distribution, I don’t see anywhere that is documenting mounting in a config via a volume (unless I am missing something). It looks like everything can be set via environment variables.

More info on this issue comment https://github.com/docker/distribution/issues/657#issuecomment-115821522

thanks that’s right added … it’s running fine … !!! ( using env variables … )