Docker Flashcards

1
Q

What is a docker container?

A

Smallest standalone unit of runnable software, along with all its required dependencies. It can be run on any docker platform.

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

What is a docker container image?

A

A Docker container image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings.

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

What are three commands common to container, and to images in docker

A

ls –> list all images/containers
rm –> remove said image/container
inspect –> print lots of info about image/container

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

what does docker system prune delete

A

unused containers, dangling images, unused networks

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

which docker command creates and starts a container from an image?

A

docker run

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

which option will you use to delete a container automatically after it is shut down

A

docker rum –rm

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

U need to specify these two options when u want to interact with your container through a terminal

A
  • i –> –interactive

- t –> –tty – attach a terminal to STDIN and STDOUT of the container.

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

option to run a container in the background (OR) not have a terminal attached to our container.

A

docker run -d

–detach

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