Skip to content

Instantly share code, notes, and snippets.

@kamal2222ahmed
Last active November 10, 2017 02:22
Show Gist options
  • Save kamal2222ahmed/e24c9f885fe566c4e8951f9f0f149007 to your computer and use it in GitHub Desktop.
Save kamal2222ahmed/e24c9f885fe566c4e8951f9f0f149007 to your computer and use it in GitHub Desktop.
1. How to see if a Docker container is running or not ?
docker inspect -f {{.State.Running}} <container-id>
2. What is a Docker Typical Workflow ( build image --> Run container ) etc
3. How do i transfer docker container from one host to another
4. How do i use docker-compose ?
5. Can i run multiple containers which are located on local disk via docker-compose ?
6. Moving docker-compose containersets around between hosts
images=(web cache db)
for image in images
do
docker save ${image} > ${image}.tar
scp ${image}.tar $yourhost:
ssh $yourhost docker load ${image}.tar
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment