I just ran into this issue myself so I hope this helps others. I set up a new Docker Registry following the documentation and configured the S3 storage driver to use DigitalOcean Spaces.
I created a new Space to host the registry's data.
That was the issue. Docker Registry (now called Distribution?) didn't like the fact that the Space (or S3 bucket) was empty. Per this suggestion on the related GitHub issue, I uploaded a random file to my Space. That took care of the issue.
For the record, here's the config I'm using:
storage:
s3:
region: us-east-1
regionendpoint: https://ams3.digitaloceanspaces.com
bucket: SPACE NAME HERE
encrypt: false
secure: true
v4auth: true
chunksize: 5242880
rootdirectory: /
with the Spaces API tokens passed through these two env vars:
REGISTRY_STORAGE_S3_ACCESSKEY=
REGISTRY_STORAGE_S3_SECRETKEY=
Config source—thanks ASB! 😄
I had to remove thekeyid: mykeyid
line for it to work.