Is there a Docker Registry storage driver for Object Storage?

December 4, 2017 2.2k views
Docker

I would like to use DigitalOcean Object Storage to store my Docker Registry Images.

5 Answers

Spaces was designed to be inter-operable with the S3 API so that you can take advantage of existing integrations. I am currently running a Docker Registry instance backed by Spaces using the S3 storage driver. The key difference to note when using it with Spaces is that you must set the regionendpoint explicitly.

Here's the storage stanza from the config.yml that I'm using:

storage:
  s3:
    accesskey: MY_SPACES_KEY
    secretkey: MY_SPACES_SECRET
    region: us-east-1
    regionendpoint: https://nyc3.digitaloceanspaces.com
    bucket: name-of-my-docker-reg-space
    encrypt: false
    keyid: mykeyid
    secure: true
    v4auth: true
    chunksize: 5242880
    rootdirectory: /

Hope that helps!

@asb @gaborglazer Did you manage to push and pull an image with this storage configuration?

When using the exact same config I'm getting the following error on a push:

level=error msg="response completed with error" err.code="manifest unknown" err.detail="unknown tag=latest" err.message="manifest unknown" go.version=go1.7.6 

I am also unable to push images by using the DigitalOcean space as storage driver.

Error during push:

e66510abeff4: Pushing [==================================================>]  3.072kB
64fd97a6ab22: Pushing [==================================================>]  56.73MB
d9bac93ee926: Pushing  2.048kB
227e20177880: Pushing [====================================>              ]  48.03MB/65.2MB
fe9c7b6dc22a: Pushing [==================================================>]  4.224MB
6b7b1fa2531c: Waiting 
6dfaec39e726: Waiting 
error parsing HTTP 403 response body: unexpected end of JSON input: ""

Error message from Registry:

level=error msg="response completed with error" err.code="blob unknown"
  • Hi @yoshz. Are you able to get debug logs from the instance running the registry? I haven't been able to reproduce these errors myself, and more information would be greatly helpful. Adding this to your registry configuration would enable debug level logging:

    log:
      level: debug
    

    This should show information about the requests the registry service makes to Spaces and hopefully shed some light on the problem.

I retried today and I was able to push now.
Not sure why it don't work before. The only difference is that I tried to push over a SSH tunnel and now push through a nginx ingress controller.

Have another answer? Share your knowledge.