delete previous docker before installing :
sudo yum remove docker docker-engine docker.io containerd runc
download docker convenience script :
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
docker whael :
sudo docker run docker/whalesay cowsay hello!
running container :
docker ps
remove a container :
docker rm #name#
list images :
docker images
remove image :
docker rmi #ngnix#
download an image :
docker pull #ngnix#
(only downloads the image)
execute command :
docker exec #distracted_mcclintock cat /etc/hosts
attach and detach :
docker run kodekloud/simple-webapp
docker run -d kodekloud/simple-webapp (background mode)
docker attach a034d (add images id)
Run a container with the nginx:1.14-alpine image and name it webapp:
docker run --name webapp nginx:1.14-alpine
tag :
docker run redis:4.0 (4.0 is the tag)
-i : interative mode
-t : terminal
inspect container :
docker inspect #name#
container logs :
docker logs #name#
How to create my own image? :
cmd vs terminal
netwokr :
docker compose :
ONLY FOR SINGLE DOCKER HOST
Sample application - vote :
docker registry :
docker engine :
docker swarm :
kubernetes 쿠벌네틱스:
'IT > Devops' 카테고리의 다른 글
Docker tutorial(2020/04) (0) | 2020.04.06 |
---|