Flashcards
2 Docker Commands
Flashcards do conjunto (18)
- 1Run a container from an imagedocker run
- 2Run an instance of nginx application on the docker hostdocker run nginx
- 3What does docker run do f image is not present on host?It will go out to docker hub and pull the image (for firs time)
- 4List all running containers and some basic infomationdocker ps
- 5What does each container automatically get from dockercontainer id an dname
- 6View all containers running or notdocker ps -a
- 7Stop docker containerdocker stop "name" or container id
- 8Remove container altogetherdocke rm "name"
- 9View list of imagesdocker images
- 10Remove nginx imagedocker rmi nginx
- 11What should you check before removing container imageCheck if containers are running off of that image
then stop and delete those containers - 12Download only nginx image and not run the containerdocker pull nginx
- 13What happens first when we run the following commang docker run ubuntuIt runs an instance of ubuntu and exits immediately
- 14Instruct ubuntu container to sleep with duration 5 secondsdocker run ubuntu sleep 5
- 15View /etc/hosts command in alibala containerdocker exec alibala cat /etc/hosts
- 16Run docker container in detached modedocker run -d "name"
- 17Attach docker containerdocker attach container id
- 18Run docker centos second time then execute bash command and log into containerdocker run -it centos bash
Informações
- Descrição
- Easy Kodekloud Docker basics FlashCards sobre 2 Docker Commands, criado por Archimed Nemes em 22-12-2022.
- Criado por
- Archimed Nemes
- Visualizações
- 0
- Avaliação