User Management

Cloudron Directory When Cloudron user management is enabled, simply use the Cloudron username and password to login. docker login registry.cloudron.space Username…

Docker Registry is the open-source server for storing and distributing container images, the standard push/pull backend behind Docker deployments.

DANIAN runs Docker Registry as a fully managed service: installation, updates, backups, monitoring and security are handled for you.

See the app catalog for plans, pricing and a free trial.

 

Cloudron Directory

When Cloudron user management is enabled, simply use the Cloudron username and password to login.

 

docker login registry.cloudron.space
Username: dockeruser
Password: 
Login Succeeded

 

Then, you can push images like so:
docker push registry.cloudron.space/hello-world
Using default tag: latest
The push refers to repository [registry.cloudron.space/hello-world]
e07ee1baac5f: Pushed 
latest: digest: sha256:f54a58bc1aac5ea1a25d796ae155dc228b3f0e11d046ae276b39c4bf2f13d8c4 size: 525

 

Without Cloudron Directory

When Cloudron user management is disabled, the registry is setup with no authentication. The main use case for this is to have the registry authenticate with an external provider such as GitLab instead of Cloudron. See the GitLab section below on how to set this up.

 

GitLab Integration

The following steps can be used to setup GitLab container registry.

  1. Create a volume named registry-shared.
  2. Attach volume name registry-shared to both GitLab and Docker Registry apps. Be sure to uncheck the Read Only checkbox.
  3. Create folders containers and certs on the host filesystem inside the path that is assigned to the registry-shared volume.

Run the following commands inside the certs folder:

openssl req -nodes -newkey rsa:2048 -keyout registry-auth.key -out registry-auth.csr -subj "/CN=gitlab-issuer"
openssl x509 -in registry-auth.csr -out registry-auth.crt -req -signkey registry-auth.key -days 365000
chmod 777 registry-auth.key registry-auth.crt registry-auth.csr

Modify the permissions from root to cloudron inside the Docker Registry app for the created folders and files.

chown -R cloudron:cloudron /media/registry-shared/

Modify /app/data/config.yml of the Docker Registry app using the File manager by altering or adding the auth part to resemble the following:

auth:
  token:
    realm: https://<GITLAB_HOST>/jwt/auth
    service: container_registry
    issuer: gitlab-issuer
    rootcertbundle: /media/registry-shared/certs/registry-auth.crt

 

Change the 'rootdirectory' value inside the same config file to:

/media/registry-shared/containers

 

Save the file and restart the app.

Modify /app/data/gitlab.yml of the GitLab app by adding the following lines (some of them might already be there, so skip them):

production:
  <<: *base

  registry:
    enabled: true
    host: <DOCKER_REGISTRY_HOST>
    port: 443
    api_url: https://<DOCKER_REGISTRY_HOST>
    key: /media/registry-shared/certs/registry-auth.key
    path: /media/registry-shared/containers
    issuer: gitlab-issuer

Save the file and restart the app.

 

For Gitlab pipelines use the $CI_REGISTRY_PASSWORD and $CI_REGISTRY_USER for authentification with the registry.

 

Explore the platform

Find more information about our company, platform, and services on our website.

Visit danian.co