When I run docker-compose up the container starts and I can log in with root, but no user named phpmyadmin is created. Is there something missing in the yml file?
version: "3.0"
networks:
dev:
services:
mariadb:
image: mariadb:latest
restart: always
ports:
- 3306:3306
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=example
- MYSQL_USER=mariadb
- MYSQL_PASSWORD=mariadb
volumes:
- /docker/mariadb:/var/lib/mysql
- /etc/localtime:/etc/localtime:ro
networks:
- dev
phpmyadmin:
image: phpmyadmin:latest
depends_on:
- mariadb
restart: always
ports:
- "8080:80"
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_USER=phpmyadmin
- MYSQL_PASSWORD=phpmyadmin
- PMA_HOST=mariadb
volumes:
- /etc/localtime:/etc/localtime:ro
networks:
- dev
When I run
docker-compose upthe container starts and I can log in with root, but no user named phpmyadmin is created. Is there something missing in the yml file?