Created
December 16, 2015 17:15
-
-
Save rugor/c47a58926d0c7fde7cec to your computer and use it in GitHub Desktop.
EC2 Migrate Mongo from localhost
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
// ssh into ec2 instance, info from 'instances' panel in ec2 dashboard | |
ssh -i /path/to/key.pem user@public_dns | |
// run command to show container ids and ports | |
docker ps | |
// prints something like the following | |
961ed99341b meteorhacks/meteord:base "/bin/sh -c 'bash $ME" 18 hours ago Up 18 hours 0.0.0.0:80->80/tcp demo | |
124a407de468 mongo "/entrypoint.sh mongo" 18 hours ago Up 18 hours 127.0.0.1:27017->27017/tcp mongodb | |
// connect to container by id to execute commands | |
docker exec -it 124a407de468 bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment