This repository is trending on Github since some days now. Watch it, we will add many updates in the future. Thank you for your support.
Check the website.
- Installation
- Docker Registries & Repositories
- Running Containers
- Starting & Stopping Containers
- Getting Information about Containers
- Networking
- Cleaning Docker
- Docker Swarm
- Notes
curl -sSL https://get.docker.com/ | sh
Use this link to download the dmg.
https://download.docker.com/mac/stable/Docker.dmg
Use the msi installer:
https://download.docker.com/win/stable/InstallDocker.msi
docker login
docker login localhost:8080
docker logout
docker logout localhost:8080
docker search nginx
docker search nginx --stars=3 --no-trunc busybox
docker pull nginx
docker pull eon01/nginx localhost:5000/myadmin/nginx
docker push eon01/nginx
docker push eon01/nginx localhost:5000/myadmin/nginx
- Start an ubuntu:latest image
- Bind the port
80
from the CONTAINER to port3000
on the HOST- Mount the current directory to
/data
on the CONTAINER- Note: on windows you have to change
-v ${PWD}:/data
to-v "C:\Data":/data
docker run --name infinite -it -p 3000:80 -v ${PWD}:/data ubuntu:latest
docker create -t -i eon01/infinite --name infinite
docker run -it --name infinite -d eon01/infinite
docker rename infinite infinity
docker rm infinite
docker update --cpu-shares 512 -m 300M infinite
docker start nginx
docker stop nginx
docker restart nginx
docker pause nginx
docker unpause nginx
docker wait nginx
docker kill nginx
docker kill -s HUP nginx
docker attach nginx
docker ps
docker ps -a
docker logs infinite
docker logs infinite -f
docker inspect infinite
docker inspect --format '{{ .NetworkSettings.IPAddress }}' $(docker ps -q)
docker events infinite
docker port infinite
docker top infinite
docker stats infinite
docker diff infinite
docker images
docker build .
docker build github.com/creack/docker-firefox
docker build - < Dockerfile
docker build - < context.tar.gz
docker build -t eon/infinite .
docker build -f myOtherDockerfile .
curl example.com/remote/Dockerfile | docker build -f - .
docker rmi nginx
docker load < ubuntu.tar.gz
docker load --input ubuntu.tar
docker save busybox > ubuntu.tar
docker history
docker commit nginx
docker tag nginx eon01/nginx
docker push eon01/nginx
docker network create -d overlay MyOverlayNetwork
docker network create -d bridge MyBridgeNetwork
docker network create -d overlay \
--subnet=192.168.0.0/16 \
--subnet=192.170.0.0/16 \
--gateway=192.168.0.100 \
--gateway=192.170.0.100 \
--ip-range=192.168.1.0/24 \
--aux-address="my-router=192.168.1.5" --aux-address="my-switch=192.168.1.6" \
--aux-address="my-printer=192.170.1.5" --aux-address="my-nas=192.170.1.6" \
MyOverlayNetwork
docker network rm MyOverlayNetwork
docker network ls
docker network inspect MyOverlayNetwork
docker network connect MyOverlayNetwork nginx
docker run -it -d --network=MyOverlayNetwork nginx
docker network disconnect MyOverlayNetwork nginx
docker rm nginx
docker rm -v nginx
docker rm $(docker ps -a -f status=exited -q)
docker rm `docker ps -a -q`
docker rmi nginx
docker rmi $(docker images -f dangling=true -q)
docker rmi $(docker images -a -q)
docker rmi -f $(docker images | grep "^<none>" | awk "{print $3}")
docker stop $(docker ps -a -q) && docker rm $(docker ps -a -q)
docker volume rm $(docker volume ls -f dangling=true -q)
docker system prune -f
docker system prune -a
curl -ssl https://get.docker.com | bash
docker swarm init --advertise-addr 192.168.10.1
docker swarm join-token worker
docker swarm join-token manager
docker service ls
docker node ls
docker service create --name vote -p 8080:80 instavote/vote
docker service ps
docker service scale vote=3
docker service update --image instavote/vote:movies vote
docker service update --force --update-parallelism 1 --update-delay 30s nginx
docker service update --update-parallelism 5--update-delay 2s --image instavote/vote:indent vote
docker service update --limit-cpu 2 nginx
docker service update --replicas=5 nginx
This work was first published in Painless Docker Course