Phpmyadmin is available as a Docker image. The mysql server connection parameters are provided when the container is instantiated.
docker run -d --name pma_local \ --network=docker_network \ -e PMA_HOST=db \ -e PMA_PORT=3306 \ -e PMA_USER=root \ -e PMA_PASSWORD=password \ -p 8080:80 phpmyadmin/phpmyadmin
--network
The docker network the phpmyadmin container will join.PMA_HOST
,PMA_PORT
Name and port of the database server host on the docker network.
Browse to phpmyadmin at http://localhost:8080