Created
April 9, 2019 16:23
-
-
Save nicbet/bfa8f7d70cd998af1040a13b47056d19 to your computer and use it in GitHub Desktop.
Running Data Services via Docker with Persistent Data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
docker run --name mysql -d -e MYSQL_USER=mysql -e MYSQL_PASSWORD=mysql -e MYSQL_ROOT_PASSWORD=mysql -v $(pwd)/mysql:/var/lib/mysql -p 3306:3306 mysql:8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
docker run -d -p 5432:5432 -v $(pwd)/postgresql:/var/lib/postgresql/data -e POSTGRES_USER=postgresql -e POSTGRES_PASSWORD=postgresql postgres:11 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
docker run -d --name redis -v $(pwd)/redis:/data -p 6379:6379 redis:5-alpine redis-server --appendonly yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment