Databases are a key component of your docker containers. Without the ability to access data, you might find those containers to be a bit less-than-capable. To that end, you might deploy MySQL via a Docker container and then connect another container to the database for data.

I want to walk you through the process of deploying a MySQL container and then connecting a phpMyAdmin container to that database, for easier management.

With our volume ready, let’s deploy the phpMyAdmin container with the command: docker run --name tns-phpmyadmin -v phpmyadmin-volume:/etc/phpmyadmin/config.usr.inc.php --link tns_mysl:db -p 82:80 -d phpmyadmin/phpmyadmin

Related Articles