docker Flashcards

1
Q

How to display all the containers

A

docker ps

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How to get a new image?

A

docker pull [image]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

how to start and how to stop a container?

A

docker start [Image] / docker stop [containerId]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a Container?

A

Container is a runnig environment for an IMAGE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How how to list all the downloaded images?

A

docker images

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

how to run a container on dettached mode?

A

docker run -d [image]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

List Running and stopped containers

A

docker ps -a

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How to pull a specific image version?

A

by adding a tag after the image name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

how to pull an image and starts a container?

A

docker run redis

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Container port dvs HOST port

A

You can duplicate Container port but not Host ports

You have to bind your computer port (host port) to the container ports

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How to Delete all the images?

A

docker system prune

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

[Actualizado] How to delete specific image?

A

docker rm imageName

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

how to bind a host port to a container post?

A

docker ps -p6000:6123

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

how to open the interactive terminal?

A

fdockdocker exec -it [containerId] /bin/bash

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How to display all docker networks?

A

docker network ls

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How to Create a docker network?

A

docker network create mongo-network

17
Q

2 steps
to make 2 containers to communicate with each other?

A

1) Create a docker network
2) run both containers on the same network

18
Q

What’s the Flag to set a network, when starting a container?

A

–net

19
Q

What’s docker Compose?

A

A file which contains common attributes, to make easier to run commands

20
Q

How to you compile an image?

A

docker build -t img_from .

21
Q

Keywords found on a Dockerfile?

A

FROM

WORKDIR

EXPOSE

COPY

RUN

ENTRYPOINT

CMD

LABEL

22
Q

What does -itd stand for?

A

interactive teletype-enabled and dettached

23
Q

How to display the current docker version?

A

docker –version

24
Q

How to Display image size

A

docker ps -s

25
Q
A
26
Q

Docker Official Images URL?

A

http://hub.docker.com/

27
Q

Como determinas si to un recurso esta operando correctamente?

A

Using Healthcheck

28
Q

Que valor devuelves para indicar que un contenedor fallo, mientras se verificaba si funcionaba correctamente?

A

EXIT 1

29
Q

Que comando usar para buscar imagenes en el docker hub?

A

docker search python:3.6

30
Q
A