Installation + Configuration Flashcards
1
Q
Installation on multiple platforms
A
Centos:
- Install required packages:
- Add docker ce repo
- Install the Docker CE packages and containerd.io
- Start and enable the Docker service:
Ubuntu:
- install required packages
- Add the Docker GPG key and repo:
- Install Docker CE packages:
2
Q
How to configure the default logging driver
A
sudo vi /etc/docker/daemon.json
{ "log-driver": "json-file", "log-opts": { "max-size": "15m" } }
3
Q
Overwrite default logging on run
A
docker run –log-driver json-file –log-opt max-size=50m nginx
4
Q
Describe the use of namespaces
A
namespaces are a linux tech that allows processes to be isolated in terms of the resources that they see
docker uses namespaces to isolate containers
5
Q
Describe some docker namespaces
A
- pid: process isolation
- net: network interfaces
- ipc: inter process communication
- mnt: filesystem mounts
- uts: kernel and version identifies
- user namespaces
6
Q
Describe the use of cgroups
A
limits an application to a specific set of resources
allow docker to share hardware resources to containers and optionally enforce constraints and limits