DOCKER Flashcards

1
Q

What command would you use to install docker?

A

Docker pull / Docker pull Ubuntu5.5:latest

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

Before completing stall, you been advised to check latest using what command?

A

$ curl -fsDL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add-

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

Instead of manual tagging of images to give names, which alternative command can one use to tag images?

A

docker commit

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

What are Ephemeral volumes?

A

volumes shared between containers and host or both and only exist while container is using them.

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

What is the imperative command for creating a docker volume?

A

Docker volume create [options] [volume]

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

What is command for deleting a docker container

A

docker container rm [container_name /container_id]

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

How do you first get a docker image from GITHUB?

A

docker run –name repo alphine/git clone \
https://github.com/docker/getting-start.git
docker cp repo:/git/getting_started/

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

how do you build docker image ?

A

docker build -t docker101tutorial

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

How do you run docker container and push it ?

A

docker run -d -p 80:80 \
–name docker-tutorial docker101tutorial

docker tag docker101tutorial folder/docker101tutorial
docker push folder/docker101tutorial

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

What is benefit of docker Compose?

A

Used as single machine coordination

Designed for testing and development

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

What command is used to set the registry to which an image will be uploaded to?

A

docker tag

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

What command do you use to add one directory to another in docker?

A

mount -o bind first-directory seconddirectory

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

When mounting volumes between host and guest which one comes first?

A

Mounting volumes always mounts the host filesystem over the guest.

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

which docker feature is used to contain networks?

A

Linux namespaces provide isolation for running processes, limiting their access to system resources.

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

What command is used to get permission to add directories into container?

A

You need to overide the default permission by running the command
$docker run -ti –rm –privilaged=true ubuntu bash

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