MySQL & PostgreSQL with Docker in development. Devteds episode#8
Switch branches/tags
Nothing to show
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore episode8 source code Oct 12, 2017 Update readme for episode video link Oct 13, 2017
docker-compose.yml episode8 source code Oct 12, 2017
my.conf episode8 source code Oct 12, 2017


Devteds Episode #8 source code

Run multiple versions of MySQL databases and PostgreSQL with Docker using Docker Compose. Test multiple options of connecting to the databases running in containers.

Episode Video Link

Episode video link

Visit to watch all the episodes

Tested on

  • macOS 10.12.3
  • Docker 17.06.2-ce
  • Docker Compose 1.14.0
  • MySQL Workbench 6.3

Run services

mkdir ~/projs
cd ~/projs
git clone db-on-docker
cd db-on-docker
mkdir data
docker-compose up

# on new terminal tab
cd ~/projs/db-on-docker
docker-compose ps

Test connection - multiple options

  • Test connection w/ database client on host OS using host OS ports
  • Test with PHP based adminer tool that run on container - http://localhost:8080
  • Test with databse clients within running containers. Examples below
docker-compose exec mysql-dev mysql -uroot -ppassword blogapp
docker-compose exec mysql-legacy mysql -uroot -ppassword legacyapp
docker-compose exec pgdb psql -U root -W blogapp

A few useful commands

docker-compose stop
docker-compose rm
docker-compose rm -f 


Find the resources and references on