02 - DOCKER BASICS Flashcards

1
Q

what are the issues with adding servers manually

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

why do we need docker ?

A

docker provides environment isolation

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

what is kubernetes ?

A

Kubernetes is a tool for running a bunch of different containers

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

what is a kubernetes cluster

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

hows is kubernetes managed

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

sample dockerfile to containerize a project

A

FROM node:alpine
WORKDIR /app
COPY package.json
RUN npm install
COPY ./ ./
CMD [“npm”, “start”]

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

what is the .dockerignore file

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

command to build a docker image

A

docker build -t [tag-name] .

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

create and start a container by image_id or tag

A

docker run [image-id or tag]

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

create and start a container, overriding the default command

A

docker run -it [image-id or tag] [cmd]

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

print out information about all of the running containers

A

docker ps

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

execute the given command in a running container

A

docker exec -it [container id] [cmd]

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

print out logs from the given container

A

docker logs [container id]

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