1. Trang chủ
  2. » Giáo Dục - Đào Tạo

192 section3flashcards kho tài liệu training

36 28 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 36
Dung lượng 365,83 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

How do you see the console output of a docker container?... What command is used to build a docker image?... How do you stop a docker container?... What parameter tells docker to run the

Trang 1

Each question will be displayed for 10 seconds

If you need more time, just press pause

Trang 2

What command will show

running containers?

Trang 3

docker ps

Trang 4

What command will show all containers? Running and stopped?

Trang 5

docker ps -a

Trang 6

What is the default tag?

Trang 7

‘latest’ is selected if no other

value is specified

Trang 8

What command do you use to

run a docker image?

Trang 9

docker run <image name>

Trang 10

How do you see the console output of a docker container?

Trang 11

docker logs <container name>

Trang 12

What command is used to build

a docker image?

Trang 13

From the directory of the Dockerfile

run:

docker build -t <tag name>

Trang 14

How do you stop a docker

container?

Trang 15

docker kill <container name>

OR docker stop <container name>

Trang 16

What parameter tells docker to run

the container as a background

process?

Trang 17

-d Example:

docker run -d <image name>

Trang 18

How do you list all docker

images on your system?

Trang 19

docker images

Trang 20

How do you map a host port to

a container port?

Trang 21

-p <host port>:<container port>

Example:

docker run -p 8080:8080 <image name>

Trang 22

How do you tail the console output

of a running docker container?

Trang 23

docker logs -f <container

name>

Trang 24

What is like a java file to a docker

image? ie, the source code?

Trang 25

The Dockerfile

Trang 26

What command will remove a

stopped docker container?

Trang 27

docker rm <container name>

Trang 28

How do you specify an environment

variable for a docker container?

Trang 29

docker run -e MY_VAR=my_prop

<image name>

Trang 30

How do you remove a docker

image from your system?

Trang 31

docker rmi <image name>

Trang 32

How do you shell into a running

docker container?

Trang 33

docker exec -it <container

name> bash

Trang 34

How do you share storage on the

host system with a docker

container?

Trang 35

-v <host path>:<container path>

Example:

docker run -v <my host path>:<the container

path> <image name>

Ngày đăng: 17/11/2019, 08:23