Skip to content

Strathcom/smi-docker-dev-db

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

devdb

A docker image for creating mysql databases for local dev.

Usage

Start a new instance...

$ docker run --name mydevdb -e MYSQL_ROOT_PASSWORD=new_password -e \
    MYSQL_DATABASE=new_db_name -d strathcom/devdb

Import data from production into the instance you just started...

$ docker run --link mydevdb:mysql strathcom/devdb import -u prod_user -p prod_pass \
    -h prod_host -d prod_db

Connect to the instance and check your data...

$ docker run -it --link mydevdb:mysql strathcom/devdb connect

mysql> show tables;
+-----------------------+
| Tables_in_new_db_name |
+-----------------------+
| ...                   |

Commit the container to create an image...

$ docker commit mydevdb strathcom/mydevdb

Then push it to docker hub so you can share it with the team...

$ docker push strathcom/mydevdb

Warning

This image extends the official mysql docker image so that the data is stored in the image rather than a volume. YOUR DATA WILL BE ERASED when the container is removed.

About

A docker image for creating mysql databases for local dev.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages