Created
June 7, 2014 05:57
-
-
Save abhinavn/8aff5f48c03cb2b09cbd to your computer and use it in GitHub Desktop.
docker link multiple containers
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
| # first create the directory for persistent data: | |
| sudo mkdir -p /data/mysql | |
| # start the database | |
| sudo docker run -d -p 3306:3306 -name todomvc_db \ | |
| -v /data/mysql:/var/lib/mysql cpswan/todomvc.mysql | |
| # start the app server | |
| sudo docker run -d -p 4567:4567 -name todomvc_app \ | |
| -link todomvc_db:db cpswan/todomvc.sinatra | |
| # start the web server | |
| sudo docker run -d -p 443:443 -name todomvc_ssl \ | |
| -link todomvc_app:app cpswan/todomvc.ssl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment