Docker Flashcards

1
Q

Components of docker

A
  1. Dockerfile
  2. Docker image
  3. Docker container
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Why is containerisation used

A

If a container can run one a machine, it can run on another machine. Don’t have to use a VM for every app

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

Downsides of containerisation

A
  1. To run the containers, need to have docker installed
  2. Images and containers can take up space. Images and containers get lost and can result in illegal stuff if not monitored
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Docker networking steps

A
  1. external client calls docker host ip with port number
  2. Docker engine maps the request with the port mapping to the internal IP of the docker container with the port number according to port mapping
    5001: 5000 -> external call 5001, it maps to 5000 of an internal app
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How does a container interact outside

A

calling host.docker.internal (ie localhost of the docker host)

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