https://github.com/slok/docker-mysql
Docker mysql with data only container approach
https://github.com/slok/docker-mysql
Last synced: 6 months ago
JSON representation
Docker mysql with data only container approach
- Host: GitHub
- URL: https://github.com/slok/docker-mysql
- Owner: slok
- License: mit
- Created: 2014-07-19T15:29:13.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-03-31T15:12:00.000Z (over 10 years ago)
- Last Synced: 2025-02-16T07:55:47.577Z (8 months ago)
- Language: Shell
- Size: 118 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
docker-mysql
============Docker mysql with data only container approach
Step one (Build the data container):
docker build -t slok/mysql-data ./mysql-data
Step two (Build the mysql container):
docker build -t slok/mysql ./mysql
Step three (Run the data container):
docker run slok/mysql-data
Step four (Run the mysql container with data volumes):
docker run --volumes-from mysql-data slok/mysql
# Backups
enter or run a command in the data container as a normal container:
docker run -it --volumes-from mysql-data busybox /bin/sh
# Databases & users
Add databases and users with pass to ``create_Database_and_users.sh`` on lines:
DATABASES=("database1" "database2")
declare -A USERS=(["user1"]="pass1" ["user2"]="pass2")