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.
Create a directory to store database state:
mkdir -p var/lib/postgresql/data
Create a directory to hold a database initialization script:
mkdir docker-entrypoint-initdb.d
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
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"
Start the containers:
docker compose up -d
- Wait for the images to be pulled and the containers to start.
You may monitor the container log output using
docker compose logs
- Browse to https://localhost/registry/
- Click through the warning from your web browser about self-signed HTTPS certificates.
- Click LOGIN and login using the Username "registry.admin" and password "password".
To stop the containers:
docker compose down