Report this

What is the reason for this report?

How To Using DigitalOcean Spaces NYC3 With Docker Registry Private ?

Posted on November 11, 2020

Hello every one,

I have a docker compose file setup private registry using space NYC3 as a volume But I can’t run it. Environment can be wrong. Can you help me?

version: '3'

services:
  nginx:
    image: "nginx:alpine"
    restart: always
    ports:
      - 443:443
    links:
      - registry:registry
    volumes:
      - ./auth:/etc/nginx/conf.d
      - ./auth:/usr/local/ssl/certificate
      - ./auth/nginx.conf:/etc/nginx/nginx.conf:ro

  registry:
    image: registry:2
    ports:
      - 5000:5000
    restart: always
    # volumes:
    #   - ./data:/var/lib/registry

    environment:
      REGISTRY_HTTP_ADDR: 0.0.0.0:5000
      REGISTRY_STORAGE: S3
      REGISTRY_STORAGE_S3_ACCESSKEY: my key
      REGISTRY_STORAGE_S3_SECRETKEY: my key
      REGISTRY_STORAGE_S3_BUCKET: cbicontainer
      REGISTRY_STORAGE_S3_REGION: nyc3
      REGISTRY_STORAGE_S3_REGIONENDPOINT: https://nyc3.digitaloceanspaces.com/
      REGISTRY_LOG_LEVEL: info
      REGISTRY_HEALTH_STORAGEDRIVER_ENABLED: "false"


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there,

I believe that the issue is caused by the fact that the REGISTRY_STORAGE_S3_REGION value should be set to “us-east-1” instead of “nyc3”. DigitalOcean Spaces is S3-compatible, but it’s not identical to AWS S3 and does not have the same regions. DigitalOcean does not have any region-specific APIs. All requests, regardless of region, should be made to “us-east-1”.

Also, as an alternative option, I would suggest using the DigitalOcean container registry which is also backed back Spaces:

https://www.digitalocean.com/products/container-registry

There is also a free plan that you can use.

Best,

Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.