Docker Flashcards

4, 7

1
Q

Docker containerisation process

code

A

Docker file
$docker build
Docker image
$docker run
Docker container

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

docker architecture

A

( docker client + docker host + registry ) on network protocol stack

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

downsides of containerisation (4)

A
  • performance overhead: every machine that needs to run the microservice needs to have Docker installed
  • upfront investment is higher: images/containers take space
  • images/containers can get damaged/lost
  • easier to package inappropriate/illegal/malicious content into images/containers without being detected
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Docker Compose

A

Docker Management tool
- defines and runs multi-containers
- use YAML files to define the configurations of containers
use “docker-compose” to run containers and related operations according to the configurations in the YAML file

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

YAML

A
  • describe software configurations in a human-readable way
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

container networking

A

each container running on a docker host is in an internal subnetwork set up by the docker engine (acts as a gateway for the containers, providing networking capabilities)

  • docker engine sets up an internal network on the docker host, assigns dynamic IP addresses to each container in the internal network (only available in internal network)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

communication among networking

A
  • container and the host in the same internal network use IP addresses
  • container can be assigned a name => communicate in same subnetwork ( act like host names )
  • containers in external networks need NAT through the docker engine and docker host
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

accessing a microservice inside a container

A
  • internal IPs are invalid externally => intermediary to translate between external and internal IPs (eg. docker engine)
  • port mapping
    *external client may access host IPs (docker host) in external network
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Network Address Translation

A
  • map one network address to another by modifying the address information in network communication data
  • allow data to be rerouted by the network to a different receiver or can appear to come from a different sender
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

port mapping

A
  • redirecting communication data from IP:port number to another IP:port number
  • docker engine maps an (external) port of the docker host (a.k.a. host port) to an (internal) port of the container (a.k.a. container port); after that, all incoming request data going to the host port is forwarded to the container port of a particular container; the data replied from the container is forwarded by the docker engine and host back to the original client.
  • different container different port number
How well did you know this?
1
Not at all
2
3
4
5
Perfectly