Compose file contains images from multiple registries
version: "3.9" # optional since v1.27.0
services:
mysqlserver:
image: [privateRegistry]/mysql:8 # pull from a private registry
volumes:
- type: volume
source: sandbox-home
target: /var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=root
phpmyadmin:
image: phpmyadmin/phpmyadmin # pull from Docker Hub
ports:
- 8080:80
environment:
- PMA_HOST=mysqlserver
volumes:
sandbox-home:
Login registries
# ~/.docker/config.json
{
"auths": {
"https://index.docker.io/v1/": {},
"[privateRegistry]": {}
},
"credsStore": "desktop"
}