Skip to content

Instantly share code, notes, and snippets.

@LRagji
Last active September 27, 2020 09:16
Show Gist options
  • Save LRagji/56ed10cff49a77b027463cd8617096eb to your computer and use it in GitHub Desktop.
Save LRagji/56ed10cff49a77b027463cd8617096eb to your computer and use it in GitHub Desktop.
Docker commands
docker ps # get info on all containers
docker stats <containerid> #get cpu memory info for a container
docker exec -it <containerid> /bin/bash #get into container shell
docker cp <containerid>:/containerpath/1000000.txt /hostpath #copies a file from active container.
scp -i <security pem file path> <remotemachine>:/home/ec2-user/1000000.txt <localmachinepath>
ssh -i /path/my-key-pair.pem my-instance-user-name@my-instance-public-dns-name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment