Last active
July 26, 2017 23:32
-
-
Save WendySanarwanto/dcb9b12be915fc3ec42b0c44556ceb38 to your computer and use it in GitHub Desktop.
Steps for creating , stopping , starting a Dockermachine & deploying containers into the docker machine where is hosted on AWS EC2
This file contains 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
Create DockerMachine & deploy containers on it: | |
----------------------------------------------- | |
1. Run these command to create docker machine on AWS EC2: | |
docker-machine create --engine-install-url=https://web.archive.org/web/20170623081500/https://get.docker.com \ | |
--driver amazonec2 \ | |
--amazonec2-access-key AKI************* \ | |
--amazonec2-secret-key 7j****************************** \ | |
--amazonec2-instance-type t2.nano \ | |
--amazonec2-region ap-southeast-1 <docker-machine-name> | |
2. Run this command: docker-machine env <docker-machine-name> | |
3. Run this command: eval $(docker-machine env <docker-machine-name>) | |
4. Ensure that we have prod.yml file then run this command: | |
docker-compose -f prod.yml up -d | |
5. To stop the running docker machine: docker-machine stop <docker-machine-name> | |
Starting the stoped docker machine: | |
----------------------------------- | |
1. run: docker-machine start <docker-machine-name> | |
2. run: docker-machine regenerate-certs <docker-machine-name> | |
3. run: docker-machine env <docker-machine-name> && eval $(docker-machine env <docker-machine-name>) | |
4. run: docker-compose start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment