- docker-ce-cli: 5:29.1.3-1~ubuntu.25.10~questing
- registry: latest (3.0)
Here are the basic steps of my workflow:
docker-compose.yml:
services:
registry:
image: 'registry:latest'
ports:
- "5000:5000"
environment:
REGISTRY_AUTH: htpasswd
REGISTRY_AUTH_HTPASSWD_PATH: /auth/htpasswd
REGISTRY_AUTH_HTPASSWD_REALM: Registry
volumes:
- type: bind
source: ../auth
target: /auth
read_only: True
Folders below $hub_path:
├── auth
│ └── htpasswd
├── docker-compose
│ └── docker-compose.yml
├── images
Adding a user credentials to the Docker registry with:
echo "$hub_password" | htpasswd -b -i -B -c "${hub_path}/auth/htpasswd" $hub_user
Building, creating and starting the Docker hub registry container with the images mount as read only with:
cd "${hub_path}/docker-compose"
docker compose -f docker-compose.yml -f docker-compose.yml up --detach
Restarting the Docker hub registry:
docker compose restart
sleep 30
Testing user credentials over the Docker registry:
echo “$hub_password” | docker login --username $hub_user --password-stdin 127.0.0.1:5000
error saving credentials: error storing credentials - err: exit status 1, out: `pass not initialized: exit status 1: Error: password store is empty. Try "pass init".`
There was no such issue with registry 2.8.
Any suggestion? It looks like something has changed with registry 3.0 that triggers that issue, but what?