Docker Flashcards
1
Q
Components of docker
A
- Dockerfile
- Docker image
- Docker container
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
3
Q
Downsides of containerisation
A
- To run the containers, need to have docker installed
- Images and containers can take up space. Images and containers get lost and can result in illegal stuff if not monitored
4
Q
Docker networking steps
A
- external client calls docker host ip with port number
- 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
5
Q
How does a container interact outside
A
calling host.docker.internal (ie localhost of the docker host)