Follow these instructions for a simple deployment of Registry that uses basic authentication with default username and password suitable for a first exploration and evaluation of Registry.

The instructions use Docker Compose and assume a Linux environment. We recommend not using Docker Desktop and instead using Docker Engine and Docker CLI with the Compose plugin installed (Scenario two).

These instructions are not suitable for a production deployment.


  1. Create a directory to store database state:

    mkdir -p var/lib/postgresql/data
  2. Create a directory to hold a database initialization script:

    mkdir docker-entrypoint-initdb.d
  3. Create the database initialization script file init-user-db.sh in the directory you just created with contents

    #!/bin/bash
    set -e
    
    psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
        CREATE USER registry_user PASSWORD '${COMANAGE_REGISTRY_DATABASE_USER_PASSWORD}';
        CREATE DATABASE registry;
        GRANT ALL PRIVILEGES ON DATABASE registry TO registry_user;
    EOSQL
  4. Create the Compose YAML file docker-compose.yml with contents

    services:
        comanage-registry-database:
            image: postgres:14
            volumes:
                - ${PWD}/var/lib/postgresql/data:/var/lib/postgresql/data
                - ${PWD}/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
            environment:
                - POSTGRES_PASSWORD=password
                - COMANAGE_REGISTRY_DATABASE_USER_PASSWORD=password
    
        comanage-registry:
            image: comanageproject/comanage-registry:4.1.2-basic-auth-1
            environment:
                - COMANAGE_REGISTRY_VIRTUAL_HOST_FQDN=localhost
            ports:
                - "80:80"
                - "443:443"
  5. Start the containers:

    docker compose up -d
  6. Wait for the images to be pulled and the containers to start.
  7. You may monitor the container log output using

    docker compose logs
  8. Browse to https://localhost/registry/
  9. Click through the warning from your web browser about self-signed HTTPS certificates.
  10. Click LOGIN and login using the Username "registry.admin" and password "password".
  11. To stop the containers:

    docker compose down
  • No labels