Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
elearning:workbooks:docker3:en:dre06 [2023/12/17 05:26] – created admin | elearning:workbooks:docker3:en:dre06 [2024/12/17 13:46] (Version actuelle) – admin | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
~~PDF: | ~~PDF: | ||
- | Version : **2023.01** | + | Version : **2024.01** |
Last update : ~~LASTMOD~~ | Last update : ~~LASTMOD~~ | ||
+ | |||
======DOF607 - Docker Security Management====== | ======DOF607 - Docker Security Management====== | ||
Ligne 15: | Ligne 16: | ||
* LAB #3 - The docker-bench-security.sh script | * LAB #3 - The docker-bench-security.sh script | ||
* LAB #4 - Securing the Docker Host Configuration | * LAB #4 - Securing the Docker Host Configuration | ||
- | * 4.1 - [WARN] 1.2.1 - Ensure a separate partition for containers has been created | ||
- | * 4.2 - [WARN] 1.2.3 - Ensure auditing is configured for the Docker daemon | ||
* LAB #5 - Securing the Docker daemon configuration | * LAB #5 - Securing the Docker daemon configuration | ||
- | * 5.1 - [WARN] 2.1 - Ensure network traffic is restricted between containers on the default bridge | + | * 5.1 - The / |
- | * 5.2 - [WARN] 2.8 - Enable user namespace support | + | |
- | * 5.3 - [WARN] 2.11 - Ensure that authorization for Docker client commands is enabled | + | |
- | * 5.4 - [WARN] 2.12 - Ensure centralized and remote logging is configured | + | |
- | * 5.5 - [WARN] 2.14 - Ensure Userland Proxy is Disabled | + | |
- | * 5.6 - [WARN] 2.17 - Ensure containers are restricted from acquiring new privileges | + | |
- | * 5.7 - The / | + | |
* LAB #6 - Securing Images and Build Files | * LAB #6 - Securing Images and Build Files | ||
- | * 6.1 - [WARN] 4.1 - Ensure a user for the container has been created | ||
- | * 6.2 - [WARN] 4.5 - Ensure Content trust for Docker is Enabled | ||
- | * 6.3 - [WARN] 4.6 - Ensure that HEALTHCHECK instructions have been added to container images | ||
* LAB #7 - Securing the Container Runtime | * LAB #7 - Securing the Container Runtime | ||
- | * 7.1 - [WARN] 5.1 - Ensure AppArmor Profile is Enabled | ||
- | * 7.2 - [WARN] 5.2 - Ensure SELinux security options are set, if applicable | ||
- | * 7.3 - [WARN] 5.10 - Ensure memory usage for container is limited | ||
- | * 7.4 - [WARN] 5.11 - Ensure CPU priority is set appropriately on the container | ||
- | * 7.5 - [WARN] 5.12 - Ensure the container' | ||
- | * 7.6 - [WARN] 5.14 - Ensure ' | ||
- | * 7.7 - [WARN] 5.25 - Ensure the container is restricted from acquiring additional privileges | ||
- | * 7.8 - [WARN] 5.26 - Ensure container health is checked at runtime | ||
- | * 7.9 - [WARN] 5.28 - Ensure PIDs cgroup limit is used | ||
* LAB #8 - Securing Images with Docker Content Trust | * LAB #8 - Securing Images with Docker Content Trust | ||
* 8.1 - DOCKER_CONTENT_TRUST | * 8.1 - DOCKER_CONTENT_TRUST | ||
Ligne 78: | Ligne 59: | ||
</ | </ | ||
- | You can see in this file the presence of sensitive information in non-secure : | + | You can see in this file the presence of non-secure |
* POSTGRES_USER | * POSTGRES_USER | ||
Ligne 98: | Ligne 79: | ||
</ | </ | ||
- | <WRAP center round important | + | <WRAP center round important |
**Important**: | **Important**: | ||
</ | </ | ||
Ligne 105: | Ligne 86: | ||
< | < | ||
- | root@manager: | + | root@manager: |
- | ID NAME DRIVER CREATED UPDATED | + | ID NAME DRIVER |
- | lpk8eq80qvfiqw7z1686fmj5t pg_user About a minute ago About a minute ago | + | lpk8eq80qvfiqw7z1686fmj5t |
</ | </ | ||
- | <WRAP center round important | + | <WRAP center round important |
- | **Important**: | + | **Important**: |
</ | </ | ||
Ligne 119: | Ligne 100: | ||
root@manager: | root@manager: | ||
h9tsfbfwz6o0sd35roklwpopi | h9tsfbfwz6o0sd35roklwpopi | ||
+ | |||
root@manager: | root@manager: | ||
5lx4zydpfocwgpdto0yy1jod9 | 5lx4zydpfocwgpdto0yy1jod9 | ||
</ | </ | ||
- | <WRAP center round important | + | <WRAP center round important |
**Important**: | **Important**: | ||
</ | </ | ||
Ligne 131: | Ligne 113: | ||
< | < | ||
root@manager: | root@manager: | ||
- | ID NAME DRIVER CREATED UPDATED | + | ID NAME DRIVER |
- | 5lx4zydpfocwgpdto0yy1jod9 pg_database 2 minutes ago 2 minutes ago | + | 5lx4zydpfocwgpdto0yy1jod9 |
- | h9tsfbfwz6o0sd35roklwpopi pg_password 3 minutes ago 3 minutes ago | + | h9tsfbfwz6o0sd35roklwpopi |
- | lpk8eq80qvfiqw7z1686fmj5t pg_user 5 minutes ago 5 minutes ago | + | lpk8eq80qvfiqw7z1686fmj5t |
</ | </ | ||
Ligne 157: | Ligne 139: | ||
</ | </ | ||
- | <WRAP center round important | + | <WRAP center round important |
**Important**: | **Important**: | ||
</ | </ | ||
Ligne 165: | Ligne 147: | ||
< | < | ||
root@manager: | root@manager: | ||
- | ID: 5lx4zydpfocwgpdto0yy1jod9 | + | ID: 5lx4zydpfocwgpdto0yy1jod9 |
- | Name: pg_database | + | Name: pg_database |
Driver: | Driver: | ||
- | Created at: 2021-04-15 03: | + | Created at: 2021-04-15 03: |
- | Updated at: 2021-04-15 03: | + | Updated at: 2021-04-15 03: |
</ | </ | ||
Ligne 230: | Ligne 212: | ||
</ | </ | ||
- | <WRAP center round important | + | <WRAP center round important |
- | **Important** : The term **external** indicates that the secrets will not be stored in the built image but **only** in the created | + | **Important** : The term **external** indicates that the secrets will not be stored in the image but **only** in the container. |
</ | </ | ||
Ligne 245: | Ligne 227: | ||
</ | </ | ||
- | <WRAP center round important | + | <WRAP center round important |
**Important** : Note a presence of the **Ignoring unsupported options: restart** error. This is due to the fact that the **restart** directive is compatible with the **docker-compose** command but not with the **docker stack** command. The directive that should have been used in the file is **restart_policy: | **Important** : Note a presence of the **Ignoring unsupported options: restart** error. This is due to the fact that the **restart** directive is compatible with the **docker-compose** command but not with the **docker stack** command. The directive that should have been used in the file is **restart_policy: | ||
</ | </ | ||
- | Now connect to Apache Guacamole and open a web browser in the virtual machine. Then navigate to the Manager address on port **8080** and fill in the secret values: | + | Now connect to Apache Guacamole and open a web browser in the **Debian11_10.0.2.46_VNC** |
{{ : | {{ : | ||
Ligne 261: | Ligne 243: | ||
< | < | ||
root@manager: | root@manager: | ||
- | NAME SERVICES ORCHESTRATOR | + | NAME SERVICES |
- | postgres 2 Swarm | + | postgres |
root@manager: | root@manager: | ||
Removing service postgres_adminer | Removing service postgres_adminer | ||
Ligne 276: | Ligne 259: | ||
root@manager: | root@manager: | ||
docker: | docker: | ||
+ | |||
root@manager: | root@manager: | ||
+ | |||
root@manager: | root@manager: | ||
- | logout | + | déconnexion |
trainee@manager: | trainee@manager: | ||
Got permission denied while trying to connect to the Docker daemon socket at unix:/// | Got permission denied while trying to connect to the Docker daemon socket at unix:/// | ||
+ | |||
trainee@manager: | trainee@manager: | ||
+ | |||
trainee@manager: | trainee@manager: | ||
- | CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | + | CONTAINER ID IMAGE |
- | d02c6115724c alpine "/ | + | d02c6115724c |
trainee@manager: | trainee@manager: | ||
alpine1 | alpine1 | ||
+ | |||
trainee@manager: | trainee@manager: | ||
a214e2df0499c97e8da25a6c9ea751ac75344c9bcd7d238f8cb8d5c777510ab9 | a214e2df0499c97e8da25a6c9ea751ac75344c9bcd7d238f8cb8d5c777510ab9 | ||
+ | |||
trainee@manager: | trainee@manager: | ||
- | CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | + | CONTAINER ID IMAGE |
- | a214e2df0499 alpine "/ | + | a214e2df0499 |
</ | </ | ||
- | =====LAB #3 - The docker-bench-security.sh===== | + | =====LAB #3 - The docker-bench-security.sh |
The **Center for Internet Security (CIS)** is an independent non-profit organisation that publishes best practices in many areas of IT. The guide for Docker can be downloaded from https:// | The **Center for Internet Security (CIS)** is an independent non-profit organisation that publishes best practices in many areas of IT. The guide for Docker can be downloaded from https:// | ||
Ligne 315: | Ligne 306: | ||
trainee@manager: | trainee@manager: | ||
Password: fenestros | Password: fenestros | ||
+ | |||
root@manager: | root@manager: | ||
Cloning in ' | Cloning in ' | ||
Ligne 329: | Ligne 321: | ||
< | < | ||
root@manager: | root@manager: | ||
+ | |||
root@manager: | root@manager: | ||
- | # ------------------------------------------------------------------------------ | + | # -------------------------------------------------------------------------------------------- |
- | # Docker Bench for Security v1.3.5 | + | # Docker Bench for Security v1.6.0 |
# | # | ||
- | # Docker, Inc (c) 2015- | + | # Docker, Inc. (c) 2015-2023 |
# | # | ||
# Checks for dozens of common best-practices around deploying Docker containers in production. | # Checks for dozens of common best-practices around deploying Docker containers in production. | ||
- | # Inspired by the CIS Docker Benchmark | + | # Based on the CIS Docker Benchmark |
- | # ------------------------------------------------------------------------------ | + | # -------------------------------------------------------------------------------------------- |
- | Initializing | + | Initializing |
+ | |||
+ | Section A - Check results | ||
[INFO] 1 - Host Configuration | [INFO] 1 - Host Configuration | ||
+ | [INFO] 1.1 - Linux Hosts Specific Configuration | ||
+ | [WARN] 1.1.1 - Ensure a separate partition for containers has been created (Automated) | ||
+ | [INFO] 1.1.2 - Ensure only trusted users are allowed to control Docker daemon (Automated) | ||
+ | [INFO] | ||
+ | [WARN] 1.1.3 - Ensure auditing is configured for the Docker daemon (Automated) | ||
+ | [WARN] 1.1.4 - Ensure auditing is configured for Docker files and directories -/ | ||
+ | [WARN] 1.1.5 - Ensure auditing is configured for Docker files and directories - / | ||
+ | [WARN] 1.1.6 - Ensure auditing is configured for Docker files and directories - /etc/docker (Automated) | ||
+ | [WARN] 1.1.7 - Ensure auditing is configured for Docker files and directories - docker.service (Automated) | ||
+ | [INFO] 1.1.8 - Ensure auditing is configured for Docker files and directories - containerd.sock (Automated) | ||
+ | [INFO] | ||
+ | [WARN] 1.1.9 - Ensure auditing is configured for Docker files and directories - docker.socket (Automated) | ||
+ | [WARN] 1.1.10 - Ensure auditing is configured for Docker files and directories - / | ||
+ | [INFO] 1.1.11 - Ensure auditing is configured for Dockerfiles and directories - / | ||
+ | [INFO] | ||
+ | [WARN] 1.1.12 - 1.1.12 Ensure auditing is configured for Dockerfiles and directories - / | ||
+ | [INFO] 1.1.13 - Ensure auditing is configured for Docker files and directories - / | ||
+ | [INFO] | ||
+ | [WARN] 1.1.14 - Ensure auditing is configured for Docker files and directories - / | ||
+ | [WARN] 1.1.15 - Ensure auditing is configured for Docker files and directories - / | ||
+ | [INFO] 1.1.16 - Ensure auditing is configured for Docker files and directories - / | ||
+ | [INFO] | ||
+ | [INFO] 1.1.17 - Ensure auditing is configured for Docker files and directories - / | ||
+ | [INFO] | ||
+ | [WARN] 1.1.18 - Ensure auditing is configured for Docker files and directories - / | ||
+ | [INFO] 1.2 - General Configuration | ||
+ | [NOTE] 1.2.1 - Ensure the container host has been Hardened (Manual) | ||
+ | [PASS] 1.2.2 - Ensure that the version of Docker is up to date (Manual) | ||
+ | [INFO] | ||
- | [INFO] | + | [INFO] |
- | [NOTE] | + | [NOTE] |
- | [INFO] 1.1.2 - Ensure Docker is up to date | + | [WARN] 2.2 - Ensure |
- | [INFO] * Using 19.03.4, verify | + | [PASS] 2.3 - Ensure the logging level is set to ' |
- | [INFO] * Your operating system vendor may provide | + | [PASS] |
+ | [PASS] 2.5 - Ensure insecure registries are not used (Scored) | ||
+ | [PASS] 2.6 - Ensure aufs storage driver is not used (Scored) | ||
+ | [INFO] | ||
+ | [INFO] | ||
+ | [INFO] 2.8 - Ensure the default ulimit | ||
+ | [INFO] | ||
+ | [WARN] 2.9 - Enable user namespace | ||
+ | [PASS] 2.10 - Ensure the default cgroup usage has been confirmed (Scored) | ||
+ | [PASS] 2.11 - Ensure base device size is not changed until needed (Scored) | ||
+ | [WARN] 2.12 - Ensure that authorization | ||
+ | [WARN] 2.13 - Ensure centralized and remote logging is configured (Scored) | ||
+ | [WARN] 2.14 - Ensure containers are restricted from acquiring new privileges (Scored) | ||
+ | [WARN] 2.15 - Ensure live restore is enabled (Scored) | ||
+ | [WARN] 2.16 - Ensure Userland Proxy is Disabled (Scored) | ||
+ | [PASS] 2.17 - Ensure that a daemon-wide custom seccomp profile is applied if appropriate (Manual) | ||
+ | [PASS] 2.18 - Ensure that experimental features are not implemented in production (Scored) | ||
- | [INFO] 1.2 - Linux Hosts Specific Configuration | + | [INFO] |
- | [WARN] 1.2.1 - Ensure a separate partition for containers | + | [PASS] 3.1 - Ensure that the docker.service file ownership is set to root:root (Automated) |
- | ... | + | [PASS] 3.2 - Ensure that docker.service file permissions are appropriately set (Automated) |
+ | [PASS] 3.3 - Ensure that docker.socket file ownership is set to root:root (Automated) | ||
+ | [PASS] 3.4 - Ensure that docker.socket file permissions are set to 644 or more restrictive (Automated) | ||
+ | [PASS] 3.5 - Ensure that the /etc/docker directory ownership is set to root:root (Automated) | ||
+ | [PASS] 3.6 - Ensure that /etc/docker directory permissions are set to 755 or more restrictively (Automated) | ||
+ | [INFO] 3.7 - Ensure that registry certificate file ownership is set to root:root (Automated) | ||
+ | [INFO] | ||
+ | [INFO] 3.8 - Ensure that registry certificate file permissions are set to 444 or more restrictively (Automated) | ||
+ | [INFO] | ||
+ | [INFO] 3.9 - Ensure that TLS CA certificate file ownership is set to root:root (Automated) | ||
+ | [INFO] | ||
+ | [INFO] 3.10 - Ensure that TLS CA certificate file permissions are set to 444 or more restrictively (Automated) | ||
+ | [INFO] | ||
+ | [INFO] 3.11 - Ensure that Docker server certificate file ownership is set to root:root (Automated) | ||
+ | [INFO] | ||
+ | [INFO] 3.12 - Ensure that the Docker server certificate file permissions are set to 444 or more restrictively (Automated) | ||
+ | [INFO] | ||
+ | [INFO] 3.13 - Ensure that the Docker server certificate key file ownership is set to root:root (Automated) | ||
+ | [INFO] | ||
+ | [INFO] 3.14 - Ensure that the Docker server certificate key file permissions are set to 400 (Automated) | ||
+ | [INFO] | ||
+ | [PASS] 3.15 - Ensure that the Docker socket file ownership is set to root:docker (Automated) | ||
+ | [PASS] 3.16 - Ensure that the Docker socket file permissions are set to 660 or more restrictively (Automated) | ||
+ | [INFO] 3.17 - Ensure that the daemon.json file ownership is set to root:root (Automated) | ||
+ | [INFO] | ||
+ | [INFO] 3.18 - Ensure that daemon.json file permissions are set to 644 or more restrictive (Automated) | ||
+ | [INFO] | ||
+ | [PASS] 3.19 - Ensure that the / | ||
+ | [PASS] 3.20 - Ensure that the / | ||
+ | [INFO] 3.21 - Ensure that the / | ||
+ | [INFO] | ||
+ | [INFO] 3.22 - Ensure that the / | ||
+ | [INFO] | ||
+ | [PASS] 3.23 - Ensure that the Containerd socket file ownership is set to root:root (Automated) | ||
+ | [PASS] 3.24 - Ensure that the Containerd socket file permissions are set to 660 or more restrictively (Automated) | ||
+ | |||
+ | [INFO] 4 - Container Images and Build File | ||
+ | [INFO] 4.1 - Ensure that a user for the container has been created (Automated) | ||
+ | [INFO] | ||
+ | [NOTE] 4.2 - Ensure that containers use only trusted base images (Manual) | ||
+ | [NOTE] 4.3 - Ensure that unnecessary packages are not installed in the container (Manual) | ||
+ | [NOTE] 4.4 - Ensure images are scanned and rebuilt to include security patches (Manual) | ||
+ | [WARN] 4.5 - Ensure Content trust for Docker is Enabled (Automated) | ||
+ | [WARN] 4.6 - Ensure that HEALTHCHECK instructions have been added to container images (Automated) | ||
+ | [WARN] | ||
+ | [WARN] | ||
+ | [WARN] | ||
+ | [WARN] | ||
+ | [PASS] 4.7 - Ensure update instructions are not used alone in the Dockerfile (Manual) | ||
+ | [NOTE] 4.8 - Ensure setuid and setgid permissions are removed (Manual) | ||
+ | [PASS] 4.9 - Ensure that COPY is used instead of ADD in Dockerfiles (Manual) | ||
+ | [NOTE] 4.10 - Ensure secrets are not stored in Dockerfiles (Manual) | ||
+ | [NOTE] 4.11 - Ensure only verified packages are installed (Manual) | ||
+ | [NOTE] 4.12 - Ensure all signed artifacts are validated (Manual) | ||
+ | |||
+ | [INFO] 5 - Container Runtime | ||
+ | [INFO] | ||
+ | |||
+ | [INFO] 6 - Docker Security Operations | ||
+ | [INFO] 6.1 - Ensure | ||
+ | [INFO] | ||
+ | [INFO] | ||
+ | [INFO] 6.2 - Ensure that container sprawl is avoided (Manual) | ||
+ | [INFO] | ||
+ | |||
+ | [INFO] 7 - Docker Swarm Configuration | ||
+ | [WARN] 7.1 - Ensure swarm mode is not Enabled, if not needed (Automated) | ||
+ | [PASS] 7.2 - Ensure that the minimum number of manager nodes have been created | ||
+ | [PASS] 7.3 - Ensure that swarm services are bound to a specific host interface (Automated) (Swarm mode not enabled) | ||
+ | [PASS] 7.4 - Ensure that all Docker swarm overlay networks are encrypted (Automated) | ||
+ | [PASS] 7.5 - Ensure that Docker' | ||
+ | [PASS] 7.6 - Ensure that swarm manager is run in auto-lock mode (Automated) (Swarm mode not enabled) | ||
+ | [PASS] 7.7 - Ensure that the swarm manager auto-lock key is rotated periodically (Manual) (Swarm mode not enabled) | ||
+ | [PASS] 7.8 - Ensure that node certificates are rotated as appropriate (Manual) (Swarm mode not enabled) | ||
+ | [PASS] 7.9 - Ensure that CA certificates are rotated as appropriate (Manual) (Swarm mode not enabled) | ||
+ | [PASS] 7.10 - Ensure that management plane traffic is separated from data plane traffic (Manual) (Swarm mode not enabled) | ||
+ | |||
+ | |||
+ | Section C - Score | ||
+ | |||
+ | [INFO] Checks: 86 | ||
+ | [INFO] Score: 1 | ||
</ | </ | ||
Ligne 358: | Ligne 479: | ||
* **[PASS]**: Concerns points that do not need to be modified, | * **[PASS]**: Concerns points that do not need to be modified, | ||
- | * WARN]**: Refers to items that **need** to be modified, | + | * **[WARN]**: Refers to items that **need** to be modified, |
- | * INFO]**: Refers to points that need to be reviewed according to the needs of your configuration, | + | * **[INFO]**: Refers to points that need to be reviewed according to the needs of your configuration, |
- | * NOTE]**: Informs you of **best practice**. | + | * **[NOTE]**: Informs you of **best practice**. |
=====LAB #4 - Securing the Docker Host Configuration===== | =====LAB #4 - Securing the Docker Host Configuration===== | ||
Ligne 369: | Ligne 490: | ||
... | ... | ||
[INFO] 1 - Host Configuration | [INFO] 1 - Host Configuration | ||
- | + | [INFO] 1.1 - Linux Hosts Specific Configuration | |
- | [INFO] 1.1 - General Configuration | + | [WARN] 1.1.1 - Ensure a separate partition for containers has been created |
- | [NOTE] 1.1.1 - Ensure the container host has been Hardened | + | [INFO] 1.1.2 - Ensure only trusted users are allowed to control Docker daemon |
- | [INFO] 1.1.2 - Ensure Docker is up to date | + | [INFO] |
- | [INFO] * Using 19.03.4, verify is it up to date as deemed necessary | + | [WARN] 1.1.3 - Ensure auditing is configured for the Docker daemon |
- | [INFO] * Your operating system vendor may provide support and security maintenance for Docker | + | [WARN] 1.1.4 - Ensure auditing is configured for Docker files and directories -/ |
- | + | [WARN] 1.1.5 - Ensure auditing is configured for Docker files and directories - / | |
- | [INFO] 1.2 - Linux Hosts Specific Configuration | + | [WARN] 1.1.6 - Ensure auditing is configured for Docker files and directories - / |
- | [WARN] 1.2.1 - Ensure a separate partition for containers has been created | + | [WARN] 1.1.7 - Ensure auditing is configured for Docker files and directories - docker.service |
- | [INFO] 1.2.2 - Ensure only trusted users are allowed to control Docker daemon | + | [INFO] 1.1.8 - Ensure auditing is configured for Docker files and directories - containerd.sock (Automated) |
- | [INFO] * docker: | + | [INFO] |
- | [WARN] 1.2.3 - Ensure auditing is configured for the Docker daemon | + | [WARN] 1.1.9 - Ensure auditing is configured for Docker files and directories - docker.socket |
- | [WARN] 1.2.4 - Ensure auditing is configured for Docker files and directories - / | + | [WARN] 1.1.10 - Ensure auditing is configured for Docker files and directories - / |
- | [WARN] 1.2.5 - Ensure auditing is configured for Docker files and directories - / | + | [INFO] 1.1.11 - Ensure auditing is configured for Dockerfiles |
- | [WARN] 1.2.6 - Ensure auditing is configured for Docker files and directories - docker.service | + | [INFO] |
- | [WARN] 1.2.7 - Ensure auditing is configured for Docker files and directories - docker.socket | + | [WARN] 1.1.12 - 1.1.12 Ensure auditing is configured for Dockerfiles and directories - / |
- | [WARN] 1.2.8 - Ensure auditing is configured for Docker files and directories - / | + | [INFO] 1.1.13 - Ensure auditing is configured for Docker files and directories - /etc/sysconfig/docker (Automated) |
- | [INFO] 1.2.9 - Ensure auditing is configured for Docker files and directories - /etc/sysconfig/docker | + | [INFO] |
- | [INFO] * File not found | + | [WARN] 1.1.14 - Ensure auditing is configured for Docker files and directories - / |
- | [INFO] 1.2.10 - Ensure auditing is configured for Docker files and directories - /etc/docker/daemon.json | + | [WARN] 1.1.15 - Ensure auditing is configured for Docker files and directories - / |
- | [INFO] * File not found | + | [INFO] 1.1.16 - Ensure auditing is configured for Docker files and directories - /usr/bin/containerd-shim-runc-v1 (Automated) |
- | [WARN] 1.2.11 - Ensure auditing is configured for Docker files and directories - / | + | [INFO] |
- | [INFO] 1.2.12 - Ensure auditing is configured for Docker files and directories - /usr/sbin/runc | + | [INFO] 1.1.17 - Ensure auditing is configured for Docker files and directories - / |
- | [INFO] * File not found | + | [INFO] |
+ | [WARN] 1.1.18 - Ensure auditing is configured for Docker files and directories - / | ||
+ | [INFO] 1.2 - General Configuration | ||
+ | [NOTE] 1.2.1 - Ensure the container host has been Hardened (Manual) | ||
+ | [PASS] 1.2.2 - Ensure that the version of Docker is up to date (Manual) | ||
+ | [INFO] | ||
... | ... | ||
</ | </ | ||
Ligne 398: | Ligne 524: | ||
Security issues that should be addressed are indicated by **[WARN]** annotations. | Security issues that should be addressed are indicated by **[WARN]** annotations. | ||
- | ====4.1 - [WARN] 1.2.1 - Ensure a separate partition for containers has been created==== | + | ====[WARN] 1.1.1 - Ensure a separate partition for containers has been created |
By default, all Docker files are stored in the **/ | By default, all Docker files are stored in the **/ | ||
- | ====4.2 - [WARN] 1.2.3 - Ensure auditing is configured for the Docker daemon==== | + | ====[WARN] 1.1.3 - Ensure auditing is configured for the Docker daemon |
< | < | ||
- | [WARN] 1.2.4 - Ensure auditing is configured for Docker files and directories - / | + | [WARN] 1.1.4 - Ensure auditing is configured for Docker files and directories -/ |
- | [WARN] 1.2.5 - Ensure auditing is configured for Docker files and directories - / | + | [WARN] 1.1.5 - Ensure auditing is configured for Docker files and directories - / |
- | [WARN] 1.2.6 - Ensure auditing is configured for Docker files and directories - docker.service | + | [WARN] 1.1.6 - Ensure auditing is configured for Docker files and directories - / |
- | [WARN] 1.2.7 - Ensure auditing is configured for Docker files and directories - docker.socket | + | [WARN] 1.1.7 - Ensure auditing is configured for Docker files and directories - docker.service |
- | [WARN] 1.2.8 - Ensure auditing is configured for Docker files and directories - / | + | [WARN] 1.1.9 - Ensure auditing is configured for Docker files and directories - docker.socket |
- | [WARN] 1.2.11 - Ensure auditing is configured for Docker files and directories - / | + | [WARN] 1.1.10 - Ensure auditing is configured for Docker files and directories - / |
+ | [WARN] 1.1.12 - Ensure auditing is configured for Dockerfiles and directories - / | ||
+ | [WARN] 1.1.14 | ||
+ | [WARN] 1.1.15 - Ensure auditing is configured for Docker files and directories - / | ||
+ | [WARN] 1.1.18 - Ensure auditing is configured for Docker files and directories - / | ||
</ | </ | ||
These warnings are present because **auditd** is not installed and because there are no rules specific to the Docker daemon and its associated directories and files. | These warnings are present because **auditd** is not installed and because there are no rules specific to the Docker daemon and its associated directories and files. | ||
+ | |||
+ | Edit the **/ | ||
+ | |||
+ | < | ||
+ | root@manager: | ||
+ | |||
+ | root@manager: | ||
+ | deb http:// | ||
+ | deb-src http:// | ||
+ | deb http:// | ||
+ | deb-src http:// | ||
+ | deb [arch=amd64] https:// | ||
+ | </ | ||
+ | |||
+ | Execute the **apt-update** command: | ||
+ | |||
+ | < | ||
+ | root@manager: | ||
+ | Ign:1 http:// | ||
+ | Atteint:2 http:// | ||
+ | Atteint:3 http:// | ||
+ | Réception de:4 https:// | ||
+ | 44,8 ko réceptionnés en 0s (107 ko/s) | ||
+ | Lecture des listes de paquets... Fait | ||
+ | Construction de l' | ||
+ | Lecture des informations d' | ||
+ | 254 packages can be upgraded. Run 'apt list --upgradable' | ||
+ | </ | ||
To install auditd, use **apt-get** : | To install auditd, use **apt-get** : | ||
< | < | ||
- | root@manager: | + | root@manager: |
</ | </ | ||
Ligne 425: | Ligne 583: | ||
< | < | ||
root@manager: | root@manager: | ||
+ | |||
root@manager: | root@manager: | ||
## First rule - delete all | ## First rule - delete all | ||
Ligne 450: | Ligne 609: | ||
-w / | -w / | ||
-w / | -w / | ||
+ | -w / | ||
+ | -w / | ||
+ | -w / | ||
+ | -w / | ||
</ | </ | ||
- | <WRAP center round important | + | <WRAP center round important |
**Important**: | **Important**: | ||
</ | </ | ||
Ligne 481: | Ligne 644: | ||
-w / | -w / | ||
-w / | -w / | ||
+ | -w / | ||
+ | -w / | ||
+ | -w / | ||
+ | -w / | ||
</ | </ | ||
- | <WRAP center round important | + | <WRAP center round important |
**Important** - For more information about creating custom rules with auditd, see this **[[https:// | **Important** - For more information about creating custom rules with auditd, see this **[[https:// | ||
</ | </ | ||
Ligne 492: | Ligne 659: | ||
root@manager: | root@manager: | ||
... | ... | ||
- | [PASS] 1.2.4 - Ensure auditing is configured for Docker files and directories - / | + | [PASS] 1.1.4 - Ensure auditing is configured for Docker files and directories -/ |
- | [PASS] 1.2.5 - Ensure auditing is configured for Docker files and directories - / | + | [PASS] 1.1.5 - Ensure auditing is configured for Docker files and directories - / |
- | [PASS] 1.2.6 - Ensure auditing is configured for Docker files and directories - docker.service | + | [PASS] 1.1.6 - Ensure auditing is configured for Docker files and directories - / |
- | [PASS] 1.2.7 - Ensure auditing is configured for Docker files and directories - docker.socket | + | [PASS] 1.1.7 - Ensure auditing is configured for Docker files and directories - docker.service |
- | [PASS] 1.2.8 - Ensure auditing is configured for Docker files and directories - / | + | [PASS] 1.1.9 - Ensure auditing is configured for Docker files and directories - docker.socket |
- | ... | + | [PASS] 1.1.10 - Ensure auditing is configured for Docker files and directories - / |
- | [PASS] 1.2.11 - Ensure auditing is configured for Docker files and directories - / | + | [PASS] 1.1.12 - Ensure auditing is configured for Dockerfiles and directories - / |
+ | [PASS] 1.1.14 - Ensure auditing is configured for Docker files and directories - / | ||
+ | [PASS] 1.1.15 - Ensure auditing is configured for Docker files and directories - / | ||
+ | [PASS] 1.1.18 - Ensure auditing is configured for Docker files and directories - / | ||
... | ... | ||
</ | </ | ||
Ligne 509: | Ligne 679: | ||
... | ... | ||
[INFO] 2 - Docker daemon configuration | [INFO] 2 - Docker daemon configuration | ||
- | [WARN] 2.1 - Ensure network traffic is restricted between containers on the default bridge | + | [NOTE] 2.1 - Run the Docker daemon as a non-root user, if possible (Manual) |
- | [PASS] 2.2 - Ensure the logging level is set to ' | + | [WARN] 2.2 - Ensure network traffic is restricted between containers on the default bridge |
- | [PASS] 2.3 - Ensure Docker is allowed to make changes to iptables | + | [PASS] 2.3 - Ensure the logging level is set to ' |
- | [PASS] 2.4 - Ensure insecure registries are not used | + | [PASS] 2.4 - Ensure Docker is allowed to make changes to iptables |
- | [PASS] 2.5 - Ensure aufs storage driver is not used | + | [PASS] 2.5 - Ensure insecure registries are not used (Scored) |
- | [INFO] 2.6 - Ensure TLS authentication for Docker daemon is configured | + | [PASS] 2.6 - Ensure aufs storage driver is not used (Scored) |
- | [INFO] * Docker daemon not listening on TCP | + | [INFO] 2.7 - Ensure TLS authentication for Docker daemon is configured |
- | [INFO] 2.7 - Ensure the default ulimit is configured appropriately | + | [INFO] |
- | [INFO] * Default ulimit doesn' | + | [INFO] 2.8 - Ensure the default ulimit is configured appropriately |
- | [WARN] 2.8 - Enable user namespace support | + | [INFO] |
- | [PASS] 2.9 - Ensure the default cgroup usage has been confirmed | + | [WARN] 2.9 - Enable user namespace support |
- | [PASS] 2.10 - Ensure base device size is not changed until needed | + | [PASS] 2.10 - Ensure the default cgroup usage has been confirmed |
- | [WARN] 2.11 - Ensure that authorization for Docker client commands is enabled | + | [PASS] 2.11 - Ensure base device size is not changed until needed |
- | [WARN] 2.12 - Ensure centralized and remote logging is configured | + | [WARN] 2.12 - Ensure that authorization for Docker client commands is enabled |
- | [PASS] 2.13 - Ensure live restore is Enabled | + | [WARN] 2.13 - Ensure centralized and remote logging is configured |
- | [WARN] 2.14 - Ensure Userland Proxy is Disabled | + | [WARN] 2.14 - Ensure containers are restricted from acquiring new privileges (Scored) |
- | [PASS] 2.15 - Ensure that a daemon-wide custom seccomp profile is applied if appropriate | + | [WARN] 2.15 - Ensure live restore is enabled |
- | [PASS] 2.16 - Ensure that experimental features are not implemented in production | + | [WARN] 2.16 - Ensure Userland Proxy is Disabled |
- | [WARN] 2.17 - Ensure containers are restricted from acquiring new privileges | + | [PASS] 2.17 - Ensure that a daemon-wide custom seccomp profile is applied if appropriate |
+ | [PASS] 2.18 - Ensure that experimental features are not implemented in production | ||
... | ... | ||
</ | </ | ||
Ligne 533: | Ligne 704: | ||
Security issues that should be addressed are indicated by the **[WARN]** annotations. | Security issues that should be addressed are indicated by the **[WARN]** annotations. | ||
- | ====5.1 - [WARN] 2.1 - Ensure network traffic is restricted between containers on the default bridge==== | + | ====[WARN] 2.2 - Ensure network traffic is restricted between containers on the default bridge |
By default, Docker allows unrestricted network traffic between containers on the same host. However, it is possible to change the default configuration. To prevent this, set the value of **icc** to **false**. In this way, docker creates containers that can communicate with each other **only** if there is a link. | By default, Docker allows unrestricted network traffic between containers on the same host. However, it is possible to change the default configuration. To prevent this, set the value of **icc** to **false**. In this way, docker creates containers that can communicate with each other **only** if there is a link. | ||
Ligne 539: | Ligne 710: | ||
For more information, | For more information, | ||
- | ====5.2 - [WARN] 2.8 - Enable user namespace support==== | + | ====[WARN] 2.9 - Enable user namespace support |
This warning indicates that the use of **user namespaces** is not enabled. The Linux kernel' | This warning indicates that the use of **user namespaces** is not enabled. The Linux kernel' | ||
Ligne 545: | Ligne 716: | ||
For more information, | For more information, | ||
- | ====5.3 - [WARN] 2.11 - Ensure that authorization for Docker client commands is enabled==== | + | ====[WARN] 2.12 - Ensure that authorization for Docker client commands is enabled |
- | By default, Docker allows unrestricted access to Docker daemons. It is possible to restrict access to authenticated users using a plug-in. This line is not important because access to the local Docker socket is restricted to members of the **docker** group (see DOF202 - Docker Host Configuration Security). | + | By default, Docker allows unrestricted access to Docker daemons. It is possible to restrict access to authenticated users using a plug-in. This line is not important because access to the local Docker socket is restricted to members of the **docker** group. |
For more information, | For more information, | ||
- | ====5.4 - [WARN] 2.12 - Ensure centralized and remote logging is configured==== | + | ====[WARN] 2.13 - Ensure centralized and remote logging is configured |
This warning indicates that the rsyslog configuration does not allow traces to be sent to a remote logging server. It also indicates that the **log-driver** value has not been specified. To enable this configuration, | This warning indicates that the rsyslog configuration does not allow traces to be sent to a remote logging server. It also indicates that the **log-driver** value has not been specified. To enable this configuration, | ||
Ligne 557: | Ligne 728: | ||
For more information, | For more information, | ||
- | ====5.5 - [WARN] 2.14 - Ensure Userland Proxy is Disabled==== | + | ====[WARN] 2.14 - Ensure containers are restricted from acquiring new privileges (Scored)==== |
+ | |||
+ | By default, a container can escalate privileges using the setuid or setgid binaries. To prevent this, set the **no-new-privileges** value to **true**. | ||
+ | |||
+ | For more information, | ||
+ | |||
+ | ====[WARN] 2.15 - Ensure live restore is enabled (Scored)==== | ||
+ | |||
+ | The --live-restore option enables full support of daemon-less containers within Docker. It ensures that Docker does not stop containers on shutdown or restore and that it properly reconnects to the container when restarted. | ||
+ | |||
+ | ====[WARN] 2.16 - Ensure Userland Proxy is Disabled | ||
There are two ways for a container to route to the outside world: | There are two ways for a container to route to the outside world: | ||
* **Hairpin NAT** mode, | * **Hairpin NAT** mode, | ||
- | * Userland Proxy**. | + | |
It is preferable to use Hairpin NAT mode, which can use iptables and has better performance. Most modern operating systems can use Hairpin NAT mode. To disable Userland Proxy, set **userland-proxy** to **false**. | It is preferable to use Hairpin NAT mode, which can use iptables and has better performance. Most modern operating systems can use Hairpin NAT mode. To disable Userland Proxy, set **userland-proxy** to **false**. | ||
Ligne 568: | Ligne 749: | ||
For more information, | For more information, | ||
- | ====5.6 - [WARN] 2.17 - Ensure containers are restricted from acquiring new privileges==== | + | ====5.1 - The / |
- | + | ||
- | By default, a container can escalate privileges using the setuid or setgid binaries. To prevent this, set the **no-new-privileges** value to **true**. | + | |
- | + | ||
- | For more information, | + | |
- | + | ||
- | ====5.7 | + | |
Create the **/ | Create the **/ | ||
Ligne 580: | Ligne 755: | ||
< | < | ||
root@manager: | root@manager: | ||
+ | |||
root@manager: | root@manager: | ||
{ | { | ||
Ligne 590: | Ligne 766: | ||
} | } | ||
</ | </ | ||
- | |||
- | Note here that **live-restore** is set to **true**. This allows containers to continue running even when the Docker daemon is not running. This is useful during a Docker upgrade. | ||
Restart the Docker service: | Restart the Docker service: | ||
Ligne 609: | Ligne 783: | ||
< | < | ||
- | root@manager: | ||
root@manager: | root@manager: | ||
... | ... | ||
- | [PASS] 2.1 - Ensure network traffic is restricted between containers on the default bridge | + | [PASS] 2.2 - Ensure network traffic is restricted between containers on the default bridge |
- | ... | + | [PASS] 2.3 - Ensure the logging level is set to ' |
- | [PASS] 2.8 - Enable user namespace support | + | [PASS] 2.4 - Ensure Docker is allowed to make changes to iptables (Scored) |
- | ... | + | [PASS] 2.5 - Ensure insecure registries are not used (Scored) |
- | [WARN] 2.11 - Ensure | + | [PASS] 2.6 - Ensure aufs storage driver is not used (Scored) |
- | [PASS] 2.12 - Ensure centralized and remote logging is configured | + | [PASS] 2.9 - Enable user namespace support |
- | ... | + | [PASS] 2.10 - Ensure the default cgroup usage has been confirmed (Scored) |
- | [PASS] 2.14 - Ensure Userland Proxy is Disabled | + | [PASS] 2.11 - Ensure |
- | ... | + | [PASS] 2.13 - Ensure centralized and remote logging is configured |
- | [PASS] 2.17 - Ensure | + | [PASS] 2.14 - Ensure containers are restricted from acquiring new privileges (Scored) |
+ | [PASS] 2.15 - Ensure live restore is enabled (Scored) | ||
+ | [PASS] 2.16 - Ensure Userland Proxy is Disabled | ||
+ | [PASS] 2.17 - Ensure that a daemon-wide custom seccomp profile is applied if appropriate (Manual) | ||
+ | [PASS] 2.18 - Ensure | ||
... | ... | ||
</ | </ | ||
Ligne 629: | Ligne 806: | ||
=====LAB #6 - Securing Images and Construction Files===== | =====LAB #6 - Securing Images and Construction Files===== | ||
- | Create | + | Create |
< | < | ||
+ | root@manager: | ||
+ | Lecture des listes de paquets... Fait | ||
+ | Construction de l' | ||
+ | Lecture des informations d' | ||
+ | Le paquet suivant a été installé automatiquement et n'est plus nécessaire : | ||
+ | libsasl2-modules | ||
+ | Veuillez utiliser « apt autoremove » pour le supprimer. | ||
+ | Les paquets suivants seront mis à jour : | ||
+ | docker-ce | ||
+ | 1 mis à jour, 0 nouvellement installés, 0 à enlever et 252 non mis à jour. | ||
+ | Il est nécessaire de prendre 22,7 Mo dans les archives. | ||
+ | Après cette opération, 497 ko d' | ||
+ | Réception de:1 https:// | ||
+ | 22,7 Mo réceptionnés en 0s (26,0 Mo/s) | ||
+ | Lecture des fichiers de modifications (« changelog »)... Terminé | ||
+ | (Lecture de la base de données... 112865 fichiers et répertoires déjà installés.) | ||
+ | Préparation du dépaquetage de .../ | ||
+ | Dépaquetage de docker-ce (5: | ||
+ | Paramétrage de docker-ce (5: | ||
+ | Traitement des actions différées (« triggers ») pour systemd (232-25+deb9u14) ... | ||
+ | |||
root@manager: | root@manager: | ||
Unable to find image ' | Unable to find image ' | ||
latest: Pulling from library/ | latest: Pulling from library/ | ||
- | 80369df48736: Pull complete | + | e9f2695d7e5b: Pull complete |
- | e8f52315cb10: Pull complete | + | 80c6055edb33: Pull complete |
- | cf2189b391fc: Pull complete | + | c646ab461d8b: Pull complete |
- | cc98f645c682: Pull complete | + | 012006c6a591: Pull complete |
- | 27a27ac83f74: Pull complete | + | 929d5fa34b95: Pull complete |
- | fa1f04453414: Pull complete | + | 17e0243877fa: Pull complete |
- | d45bf7d22d33: Pull complete | + | 1850b459cd2f: Pull complete |
- | 3dbac26e409c: Pull complete | + | 8dceaed53baf: Pull complete |
- | 9017140fb8c1: Pull complete | + | 197b834ea1cd: Pull complete |
- | b76dda2673ae: | + | 8df78c25b227: Pull complete |
- | bea9eb46d12a: | + | Digest: sha256:ceb98918916bd5261b3e9866ac8271d75d276b8a4db56f1dc190770342a77a9b |
- | e1f050a38d0f: Pull complete | + | |
- | Digest: sha256:7345ce4ce6f0c1771d01fa333b8edb2c606ca59d385f69575f8e3e2ec6695eee | + | |
Status: Downloaded newer image for mysql: | Status: Downloaded newer image for mysql: | ||
- | 54606c03c52c5e3ec0328029d69b869d4b285fb433015576dedc8b8dd4ad0494 | + | e503dd98f88992ae6ed5ec4dcaa2e18982ade8ec74966869515a120763418f74 |
root@manager: | root@manager: | ||
- | CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | + | CONTAINER ID IMAGE |
- | 54606c03c52c | + | e503dd98f889 |
</ | </ | ||
Ligne 661: | Ligne 858: | ||
... | ... | ||
[INFO] 4 - Container Images and Build File | [INFO] 4 - Container Images and Build File | ||
- | [WARN] 4.1 - Ensure a user for the container has been created | + | [WARN] 4.1 - Ensure |
- | [WARN] * Running as root: mysql | + | [WARN] |
- | [NOTE] 4.2 - Ensure that containers use only trusted base images | + | [NOTE] 4.2 - Ensure that containers use only trusted base images |
- | [NOTE] 4.3 - Ensure that unnecessary packages are not installed in the container | + | [NOTE] 4.3 - Ensure that unnecessary packages are not installed in the container |
- | [NOTE] 4.4 - Ensure images are scanned and rebuilt to include security patches | + | [NOTE] 4.4 - Ensure images are scanned and rebuilt to include security patches |
- | [WARN] 4.5 - Ensure Content trust for Docker is Enabled | + | [WARN] 4.5 - Ensure Content trust for Docker is Enabled |
- | [WARN] 4.6 - Ensure that HEALTHCHECK instructions have been added to container images | + | [WARN] 4.6 - Ensure that HEALTHCHECK instructions have been added to container images |
- | [WARN] | + | [WARN] |
- | [WARN] | + | [PASS] 4.7 - Ensure update instructions are not used alone in the Dockerfile |
- | [INFO] 4.7 - Ensure update instructions are not use alone in the Dockerfile | + | [NOTE] 4.8 - Ensure setuid and setgid permissions are removed |
- | [INFO] * Update instruction found: [mysql: | + | [PASS] 4.9 - Ensure that COPY is used instead of ADD in Dockerfiles |
- | [NOTE] 4.8 - Ensure setuid and setgid permissions are removed | + | [NOTE] 4.10 - Ensure secrets are not stored in Dockerfiles |
- | [PASS] 4.9 - Ensure that COPY is used instead of ADD in Dockerfiles | + | [NOTE] 4.11 - Ensure only verified packages are installed |
- | [NOTE] 4.10 - Ensure secrets are not stored in Dockerfiles | + | [NOTE] 4.12 - Ensure all signed artifacts are validated (Manual) |
- | [NOTE] 4.11 - Ensure only verified packages are installed | + | |
... | ... | ||
</ | </ | ||
- | ====6.1 - [WARN] 4.1 - Ensure a user for the container has been created==== | + | ====[WARN] 4.1 - Ensure |
The processes in the **mysql** container run under the root UID. This is the default Docker action. | The processes in the **mysql** container run under the root UID. This is the default Docker action. | ||
Ligne 685: | Ligne 881: | ||
For more information, | For more information, | ||
- | ====6.2 - [WARN] 4.5 - Ensure Content trust for Docker is Enabled==== | + | ====[WARN] 4.5 - Ensure Content trust for Docker is Enabled |
This line indicates that Content trust support has not been enabled. Content trust ensures that the images used are signed. | This line indicates that Content trust support has not been enabled. Content trust ensures that the images used are signed. | ||
Ligne 694: | Ligne 890: | ||
root@manager: | root@manager: | ||
DOCKER_CONTENT_TRUST=1 | DOCKER_CONTENT_TRUST=1 | ||
+ | |||
root@manager: | root@manager: | ||
</ | </ | ||
Ligne 700: | Ligne 897: | ||
< | < | ||
- | root@manager: | + | root@manager: |
+ | Connection to 10.0.2.62 closed by remote host. | ||
+ | Connection to 10.0.2.62 closed. | ||
+ | |||
+ | root@debian11: | ||
+ | trainee@10.0.2.62' | ||
+ | Linux manager.i2tch.loc 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64 | ||
+ | |||
+ | The programs included with the Debian GNU/Linux system are free software; | ||
+ | the exact distribution terms for each program are described in the | ||
+ | individual files in / | ||
+ | |||
+ | Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent | ||
+ | permitted by applicable law. | ||
+ | Last login: Sun Dec 17 18:39:07 2023 from 10.0.2.46 | ||
+ | |||
+ | trainee@manager: | ||
+ | Mot de passe : fenestros | ||
+ | |||
+ | root@manager: | ||
+ | |||
+ | root@manager: | ||
+ | |||
+ | root@manager: | ||
mysql | mysql | ||
- | root@manager: | ||
- | CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | ||
- | 54606c03c52c mysql " | ||
</ | </ | ||
Ligne 713: | Ligne 930: | ||
... | ... | ||
[INFO] 4 - Container Images and Build File | [INFO] 4 - Container Images and Build File | ||
- | [WARN] 4.1 - Ensure a user for the container has been created | + | [WARN] 4.1 - Ensure |
- | [WARN] * Running as root: mysql | + | [WARN] |
- | [NOTE] 4.2 - Ensure that containers use only trusted base images | + | [NOTE] 4.2 - Ensure that containers use only trusted base images |
- | [NOTE] 4.3 - Ensure that unnecessary packages are not installed in the container | + | [NOTE] 4.3 - Ensure that unnecessary packages are not installed in the container |
- | [NOTE] 4.4 - Ensure images are scanned and rebuilt to include security patches | + | [NOTE] 4.4 - Ensure images are scanned and rebuilt to include security patches |
- | [PASS] 4.5 - Ensure Content trust for Docker is Enabled | + | [PASS] 4.5 - Ensure Content trust for Docker is Enabled |
- | [WARN] 4.6 - Ensure that HEALTHCHECK instructions have been added to container images | + | [WARN] 4.6 - Ensure that HEALTHCHECK instructions have been added to container images |
- | [WARN] | + | [WARN] |
- | [WARN] | + | [PASS] 4.7 - Ensure update instructions are not used alone in the Dockerfile |
- | [INFO] 4.7 - Ensure update instructions are not use alone in the Dockerfile | + | [NOTE] 4.8 - Ensure setuid and setgid permissions are removed |
- | [INFO] * Update instruction found: [mysql: | + | [PASS] 4.9 - Ensure that COPY is used instead of ADD in Dockerfiles |
- | [NOTE] 4.8 - Ensure setuid and setgid permissions are removed | + | [NOTE] 4.10 - Ensure secrets are not stored in Dockerfiles |
- | [PASS] 4.9 - Ensure that COPY is used instead of ADD in Dockerfiles | + | [NOTE] 4.11 - Ensure only verified packages are installed |
- | [NOTE] 4.10 - Ensure secrets are not stored in Dockerfiles | + | [NOTE] 4.12 - Ensure all signed artifacts are validated (Manual) |
- | [NOTE] 4.11 - Ensure only verified packages are installed | + | |
... | ... | ||
</ | </ | ||
Ligne 733: | Ligne 949: | ||
For more information, | For more information, | ||
- | ====6.3 - [WARN] 4.6 - Ensure that HEALTHCHECK instructions have been added to container images==== | + | ====[WARN] 4.6 - Ensure that HEALTHCHECK instructions have been added to container images==== |
When an image is built, it is possible to add a **HEALTHCHECK** whose status can be checked by Docker in order to restart the container if necessary. | When an image is built, it is possible to add a **HEALTHCHECK** whose status can be checked by Docker in order to restart the container if necessary. | ||
Ligne 755: | Ligne 971: | ||
... | ... | ||
[INFO] 5 - Container Runtime | [INFO] 5 - Container Runtime | ||
- | [WARN] 5.1 - Ensure that, if applicable, an AppArmor Profile is enabled | + | [WARN] 5.1 - Ensure that, if applicable, an AppArmor Profile is enabled |
- | [WARN] * No AppArmorProfile Found: mysql | + | [WARN] |
- | [WARN] 5.2 - Ensure that, if applicable, SELinux security options are set | + | [WARN] 5.2 - Ensure that, if applicable, SELinux security options are set (Automated) |
- | [WARN] * No SecurityOptions Found: mysql | + | [WARN] |
- | [PASS] 5.3 - Ensure Linux Kernel Capabilities | + | [PASS] 5.3 - Ensure |
- | [PASS] 5.4 - Ensure that privileged containers are not used | + | [PASS] 5.4 - Ensure that privileged containers are not used (Automated) |
- | [PASS] 5.5 - Ensure sensitive host system directories are not mounted on containers | + | [PASS] 5.5 - Ensure sensitive host system directories are not mounted on containers |
- | [PASS] 5.6 - Ensure sshd is not run within containers | + | [PASS] 5.6 - Ensure sshd is not run within containers |
- | [PASS] 5.7 - Ensure privileged ports are not mapped within containers | + | [PASS] 5.7 - Ensure privileged ports are not mapped within containers |
- | [NOTE] 5.8 - Ensure that only needed ports are open on the container | + | [PASS] 5.8 - Ensure that only needed ports are open on the container |
- | [PASS] 5.9 - Ensure the host's network namespace is not shared | + | [PASS] 5.9 - Ensure |
- | [WARN] 5.10 - Ensure that the memory usage for containers is limited | + | [WARN] 5.10 - Ensure that the memory usage for containers is limited |
- | [WARN] * Container running without memory restrictions: | + | [WARN] |
- | [WARN] 5.11 - Ensure CPU priority is set appropriately on the container | + | [WARN] 5.11 - Ensure |
- | [WARN] * Container running without CPU restrictions: | + | [WARN] |
- | [WARN] 5.12 - Ensure that the container' | + | [WARN] 5.12 - Ensure that the container' |
- | [WARN] * Container running with root FS mounted R/W: mysql | + | [WARN] |
- | [PASS] 5.13 - Ensure that incoming container traffic is bound to a specific host interface | + | [PASS] 5.13 - Ensure that incoming container traffic is bound to a specific host interface |
- | [WARN] 5.14 - Ensure that the ' | + | [WARN] 5.14 - Ensure that the ' |
- | [WARN] * MaximumRetryCount is not set to 5: mysql | + | [WARN] |
- | [PASS] 5.15 - Ensure the host's process namespace is not shared | + | [PASS] 5.15 - Ensure |
- | [PASS] 5.16 - Ensure the host's IPC namespace is not shared | + | [PASS] 5.16 - Ensure |
- | [PASS] 5.17 - Ensure that host devices are not directly exposed to containers | + | [PASS] 5.17 - Ensure that host devices are not directly exposed to containers |
- | [INFO] 5.18 - Ensure that the default ulimit is overwritten at runtime if needed | + | [INFO] 5.18 - Ensure that the default ulimit is overwritten at runtime if needed |
- | [INFO] * Container no default ulimit override: mysql | + | [INFO] |
- | [PASS] 5.19 - Ensure mount propagation mode is not set to shared | + | [PASS] 5.19 - Ensure mount propagation mode is not set to shared |
- | [PASS] 5.20 - Ensure the host's UTS namespace is not shared | + | [PASS] 5.20 - Ensure |
- | [PASS] 5.21 - Ensure the default seccomp profile is not Disabled | + | [PASS] 5.21 - Ensure the default seccomp profile is not Disabled |
- | [NOTE] 5.22 - Ensure docker exec commands are not used with privileged option | + | [NOTE] 5.22 - Ensure |
- | [NOTE] 5.23 - Ensure that docker exec commands are not used with the user=root option | + | [NOTE] 5.23 - Ensure that docker exec commands are not used with the user=root option |
- | [PASS] 5.24 - Ensure that cgroup usage is confirmed | + | [PASS] 5.24 - Ensure that cgroup usage is confirmed |
- | [WARN] 5.25 - Ensure that the container is restricted from acquiring additional privileges | + | [PASS] 5.25 - Ensure that the container is restricted from acquiring additional privileges |
- | [WARN] * Privileges not restricted: mysql | + | [WARN] 5.26 - Ensure that container health is checked at runtime |
- | [WARN] 5.26 - Ensure that container health is checked at runtime | + | [WARN] |
- | [WARN] * Health check not set: mysql | + | [INFO] 5.27 - Ensure that Docker commands always make use of the latest version of their image (Manual) |
- | [INFO] 5.27 - Ensure that Docker commands always make use of the latest version of their image | + | [WARN] 5.28 - Ensure that the PIDs cgroup limit is used (Automated) |
- | [WARN] 5.28 - Ensure that the PIDs cgroup limit is used | + | [WARN] |
- | [WARN] * PIDs limit not set: mysql | + | [INFO] 5.29 - Ensure that Docker' |
- | [INFO] 5.29 - Ensure that Docker' | + | [INFO] |
- | [INFO] * Container in docker0 network: mysql | + | [PASS] 5.30 - Ensure that the host's user namespaces are not shared |
- | [PASS] 5.30 - Ensure that the host's user namespaces are not shared | + | [PASS] 5.31 - Ensure that the Docker socket is not mounted inside any containers |
- | [PASS] 5.31 - Ensure that the Docker socket is not mounted inside any containers | + | |
... | ... | ||
</ | </ | ||
Ligne 802: | Ligne 1017: | ||
Security issues that should be addressed are indicated by **[WARN]** annotations. | Security issues that should be addressed are indicated by **[WARN]** annotations. | ||
- | ====7.1 - [WARN] 5.1 - Ensure AppArmor Profile is Enabled==== | + | ====[WARN] 5.1 - Ensure |
This warning is present because the container does not use AppArmor. | This warning is present because the container does not use AppArmor. | ||
Ligne 808: | Ligne 1023: | ||
For more information, | For more information, | ||
- | ====7.2 - [WARN] 5.2 - Ensure SELinux security options are set, if applicable==== | + | ====[WARN] 5.2 - Ensure |
This warning is present because the container does not use SELinux. | This warning is present because the container does not use SELinux. | ||
Ligne 814: | Ligne 1029: | ||
For more information, | For more information, | ||
- | ====7.3 - [WARN] 5.10 - Ensure memory usage for container | + | ====[WARN] 5.10 - Ensure |
This warning is due to the fact that containers automatically have access to the entire RAM of the Docker host : | This warning is due to the fact that containers automatically have access to the entire RAM of the Docker host : | ||
< | < | ||
- | root@manager: | + | root@manager: |
- | b04b2a6f0dd93da21a8b7640afc319406e42868a141f90936dbcf52ab5bffb0d | + | Unable to find image ' |
- | root@manager: | + | sha256: |
- | CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS | + | 1f7ce2fa46ab: |
- | b04b2a6f0dd9 dazzling_blackburn | + | 9b16c94bb686: |
+ | 9a59d19f9c5b: | ||
+ | 9ea27b074f71: | ||
+ | c6edf33e2524: | ||
+ | 84b1ff10387b: | ||
+ | 517357831967: | ||
+ | Digest: sha256: | ||
+ | Status: Downloaded newer image for nginx@sha256: | ||
+ | Tagging nginx@sha256: | ||
+ | e14d5112c2feb71e6f37252bcf99d03603d6b7a3e200bff0d55611a0e9a25e2b | ||
+ | |||
+ | root@manager: | ||
+ | CONTAINER ID NAME CPU % | ||
+ | e14d5112c2fe | ||
+ | e503dd98f889 | ||
^C | ^C | ||
</ | </ | ||
Ligne 830: | Ligne 1059: | ||
< | < | ||
- | root@manager: | + | root@manager: |
- | CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | + | CONTAINER ID IMAGE |
- | b04b2a6f0dd9 | + | e14d5112c2fe |
- | 5b31fe1e13bc ubuntu "bash -c ':() { : | ..." | + | e503dd98f889 |
- | 7788c67c3b69 | + | |
- | root@manager: | + | root@manager: |
- | b0 | + | e14 |
- | root@manager: | + | |
- | 095472e5096a57277230ff94822d9bd0ad479ad26a33cbf83ec381cdb02910e1 | + | root@manager: |
- | root@manager: | + | 38e91e096c83f7cbe78089617a4d70110bd273f53339f8fed8df2503d3cd65ca |
- | CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS | + | |
- | 095472e5096a affectionate_goldstine | + | root@manager: |
+ | CONTAINER ID NAME CPU % | ||
+ | 38e91e096c83 | ||
+ | e503dd98f889 | ||
^C | ^C | ||
</ | </ | ||
Ligne 847: | Ligne 1079: | ||
For more information, | For more information, | ||
- | ====7.4 - [WARN] 5.11 - Ensure CPU priority is set appropriately on the container==== | + | ====[WARN] 5.11 - Ensure |
This warning is due to the fact that containers automatically have access to all CPUs on the Docker host. To limit this access, several options are available, the most commonly used of which is **--cpu-shares**. | This warning is due to the fact that containers automatically have access to all CPUs on the Docker host. To limit this access, several options are available, the most commonly used of which is **--cpu-shares**. | ||
Ligne 855: | Ligne 1087: | ||
For more information, | For more information, | ||
- | ====7.5 - [WARN] 5.12 - Ensure the container' | + | ====[WARN] 5.12 - Ensure |
To minimise the risk of a container being compromised by the presence of malicious code, it is advisable to start containers as read-only, except for volumes that require read/write access. | To minimise the risk of a container being compromised by the presence of malicious code, it is advisable to start containers as read-only, except for volumes that require read/write access. | ||
Ligne 862: | Ligne 1094: | ||
< | < | ||
- | root@manager: | + | root@manager: |
</ | </ | ||
Ligne 868: | Ligne 1100: | ||
< | < | ||
- | root@manager: | + | root@manager: |
- | A / | + | |
C /run | C /run | ||
C /run/mysqld | C /run/mysqld | ||
+ | A / | ||
A / | A / | ||
A / | A / | ||
A / | A / | ||
A / | A / | ||
- | A /run/ | + | A /write_a_file |
</ | </ | ||
- | <WRAP center round important | + | <WRAP center round important |
**Important**: | **Important**: | ||
</ | </ | ||
Ligne 886: | Ligne 1118: | ||
< | < | ||
- | root@manager: | + | root@manager: |
mysql | mysql | ||
- | root@manager: | + | |
+ | root@manager: | ||
mysql | mysql | ||
</ | </ | ||
Ligne 895: | Ligne 1128: | ||
< | < | ||
- | root@manager: | + | root@manager: |
- | 7788c67c3b692515f63f4659a8f40af397bfbde97485e2e40c500c16b158045b | + | 711ab28bdfb41220c84246c1658bcde398681a78291bbbe7d3bbfd9bc317d41b |
- | root@manager: | + | |
- | CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | + | |
- | 7788c67c3b69 mysql " | + | |
</ | </ | ||
Ligne 905: | Ligne 1135: | ||
< | < | ||
- | root@manager: | + | root@manager: |
touch: cannot touch '/ | touch: cannot touch '/ | ||
</ | </ | ||
- | <WRAP center round important | + | <WRAP center round important |
**Important** : Note the error **touch: cannot touch '/ | **Important** : Note the error **touch: cannot touch '/ | ||
</ | </ | ||
- | Run the **docker | + | Run the **docker diff** command: |
< | < | ||
- | root@manager: | + | root@manager: |
root@manager: | root@manager: | ||
</ | </ | ||
- | <WRAP center round important | + | <WRAP center round important |
**Important**: | **Important**: | ||
</ | </ | ||
- | ====7.6 - [WARN] 5.14 - Ensure ' | + | ====[WARN] 5.14 - Ensure |
- | This warning concerns the container restart policy. The **on-failure[: | + | This warning concerns the container restart policy. The **on-failure[: |
- | # docker | + | # docker run -d --name mysql --read-only --restart on-failure: |
For more information, | For more information, | ||
- | ====7.7 - [WARN] 5.25 - Ensure the container is restricted from acquiring additional privileges==== | + | ====[WARN] 5.26 - Ensure |
- | + | ||
- | To complete the configuration you have already set up, you need to run the container using the **--security-opt** option: | + | |
- | + | ||
- | # docker container run -d --name mysql --read-only --restart on-failure: | + | |
- | + | ||
- | For more information, | + | |
- | + | ||
- | ====7.8 - [WARN] 5.26 - Ensure container health is checked at runtime==== | + | |
See Warning 4.6. | See Warning 4.6. | ||
- | ====7.9 - [WARN] 5.28 - Ensure PIDs cgroup limit is used==== | + | ====[WARN] 5.28 - Ensure |
- | Without using the **--pids-limit** option, a container could fall victim to a **[[https:// | + | Without using the **--pids-limit** option, a container could fall victim to a **[[https:// |
< | < | ||
- | root@manager: | + | # docker run -u 1000 ubuntu bash -c ":() { : | : & }; :; while [[ true ]]; do sleep 1; done" |
</ | </ | ||
- | The **manager** Docker host crashes. | + | The **manager** Docker host crashes. |
+ | |||
+ | To avoid this, create | ||
< | < | ||
- | root@manager: | + | root@manager: |
- | CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | + | Unable to find image ' |
- | 05b11e44e595 ubuntu " | + | sha256: |
- | ... | + | a48641193673: |
- | root@manager: | + | Digest: sha256: |
- | 05 | + | Status: Downloaded newer image for ubuntu@sha256: |
- | root@manager: | + | Tagging ubuntu@sha256: |
environment: | environment: | ||
environment: | environment: | ||
Ligne 968: | Ligne 1192: | ||
environment: | environment: | ||
environment: | environment: | ||
- | ^C | + | environment: |
+ | environment: | ||
+ | environment: | ||
+ | environment: | ||
+ | environment: | ||
+ | environment: | ||
+ | ^P^Q | ||
</ | </ | ||
For more information, | For more information, | ||
- | Now delete all containers that have already | + | Now delete all containers that have been created : |
< | < | ||
- | root@manager: | + | root@manager: |
- | CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | + | db5ae43c3e55 |
- | 095472e5096a nginx " | + | f3b2528fbac0 |
- | 5b31fe1e13bc ubuntu "bash -c ':() { : | ..." 28 minutes ago Exited (254) 28 minutes ago pensive_fermat | + | 711ab28bdfb4 |
- | 7788c67c3b69 mysql " | + | |
- | root@manager: | + | root@manager: |
- | 095 | + | CONTAINER ID IMAGE |
- | root@manager: | + | |
- | 5b31fe1e13bc | + | |
- | 7788c67c3b69 | + | |
- | 095472e5096a | + | |
- | root@manager: | + | |
- | CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | + | |
</ | </ | ||
Ligne 994: | Ligne 1218: | ||
< | < | ||
- | root@manager: | + | root@manager: |
- | root@manager: | + | f49d1ffdeae2e83435e8cc3a2e03fb2e0b33e5609d266e5a3403ff8859e5d122 |
- | df54974ebc11fe357f6e8e9b0f8499aee2658af435e32a45058a1e49fcd3dc24 | + | |
root@manager: | root@manager: | ||
- | CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | + | CONTAINER ID IMAGE |
- | df54974ebc11 | + | f49d1ffdeae2 |
</ | </ | ||
Ligne 1007: | Ligne 1231: | ||
root@manager: | root@manager: | ||
... | ... | ||
- | [INFO] 5 - Container Runtime | + | [PASS] 5.2 - Ensure that, if applicable, SELinux security options are set (Automated) |
- | [WARN] 5.1 - Ensure that, if applicable, an AppArmor Profile is enabled | + | [PASS] 5.10 - Ensure that the memory usage for containers is limited |
- | [WARN] * No AppArmorProfile Found: mysql | + | [PASS] 5.11 - Ensure |
- | [PASS] 5.2 - Ensure that, if applicable, SELinux security options are set | + | [PASS] 5.12 - Ensure that the container' |
- | [PASS] 5.3 - Ensure Linux Kernel Capabilities are restricted within containers | + | [PASS] 5.14 - Ensure that the ' |
- | [PASS] 5.4 - Ensure that privileged containers are not used | + | [PASS] 5.28 - Ensure that the PIDs cgroup limit is used (Automated) |
- | [PASS] 5.5 - Ensure sensitive host system directories are not mounted on containers | + | |
- | [PASS] 5.6 - Ensure sshd is not run within containers | + | |
- | [PASS] 5.7 - Ensure privileged ports are not mapped within containers | + | |
- | [NOTE] 5.8 - Ensure that only needed ports are open on the container | + | |
- | [PASS] 5.9 - Ensure the host's network namespace is not shared | + | |
- | [PASS] 5.10 - Ensure that the memory usage for containers is limited | + | |
- | [PASS] 5.11 - Ensure CPU priority is set appropriately on the container | + | |
- | [PASS] 5.12 - Ensure that the container' | + | |
- | [PASS] 5.13 - Ensure that incoming container traffic is bound to a specific host interface | + | |
- | [PASS] 5.14 - Ensure that the ' | + | |
- | [PASS] 5.15 - Ensure the host's process namespace is not shared | + | |
- | [PASS] 5.16 - Ensure the host's IPC namespace is not shared | + | |
- | [PASS] 5.17 - Ensure that host devices are not directly exposed to containers | + | |
- | [INFO] 5.18 - Ensure that the default ulimit is overwritten at runtime if needed | + | |
- | [INFO] * Container no default ulimit override: mysql | + | |
- | [PASS] 5.19 - Ensure mount propagation mode is not set to shared | + | |
- | [PASS] 5.20 - Ensure the host's UTS namespace is not shared | + | |
- | [PASS] 5.21 - Ensure the default seccomp profile is not Disabled | + | |
- | [NOTE] 5.22 - Ensure docker exec commands are not used with privileged option | + | |
- | [NOTE] 5.23 - Ensure that docker exec commands are not used with the user=root option | + | |
- | [PASS] 5.24 - Ensure that cgroup usage is confirmed | + | |
- | [PASS] 5.25 - Ensure that the container is restricted from acquiring additional privileges | + | |
- | [WARN] 5.26 - Ensure that container health is checked at runtime | + | |
- | [WARN] * Health check not set: mysql | + | |
- | [INFO] 5.27 - Ensure that Docker commands always make use of the latest version of their image | + | |
- | [PASS] 5.28 - Ensure that the PIDs cgroup limit is used | + | |
- | [INFO] 5.29 - Ensure that Docker' | + | |
- | [INFO] * Container in docker0 network: mysql | + | |
- | [PASS] 5.30 - Ensure that the host's user namespaces are not shared | + | |
- | [PASS] 5.31 - Ensure that the Docker socket is not mounted inside any containers | + | |
... | ... | ||
</ | </ | ||
Ligne 1096: | Ligne 1290: | ||
</ | </ | ||
- | <WRAP center round important | + | <WRAP center round important |
**Important**: | **Important**: | ||
</ | </ | ||
Ligne 1118: | Ligne 1312: | ||
< | < | ||
root@manager: | root@manager: | ||
- | REPOSITORY TAG IMAGE ID CREATED SIZE | + | REPOSITORY |
- | ubuntu latest 775349758637 9 days ago 64.2MB | + | ubuntu |
- | nginx latest 540a289bab6c 2 weeks ago 126MB | + | nginx |
- | alpine latest 965ea09ff2eb 2 weeks ago 5.55MB | + | alpine |
- | mysql latest c8ee894bd2bd 3 weeks ago 456MB | + | mysql |
- | centos latest 0f3e07c0138f 5 weeks ago 220MB | + | centos |
</ | </ | ||
Ligne 1148: | Ligne 1342: | ||
root@manager: | root@manager: | ||
- | REPOSITORY TAG IMAGE ID CREATED SIZE | + | REPOSITORY |
- | ubuntu latest 775349758637 9 days ago 64.2MB | + | ubuntu |
- | nginx latest 540a289bab6c 2 weeks ago 126MB | + | nginx |
- | alpine latest 965ea09ff2eb 2 weeks ago 5.55MB | + | alpine |
- | mysql latest c8ee894bd2bd 3 weeks ago 456MB | + | mysql |
- | centos latest 0f3e07c0138f 5 weeks ago 220MB | + | centos |
- | i2tch/ | + | i2tch/ |
root@manager: | root@manager: | ||
Ligne 1192: | Ligne 1386: | ||
< | < | ||
root@manager: | root@manager: | ||
- | REPOSITORY TAG IMAGE ID CREATED SIZE | + | REPOSITORY |
- | ubuntu latest 775349758637 9 days ago 64.2MB | + | ubuntu |
- | nginx latest 540a289bab6c 2 weeks ago 126MB | + | nginx latest |
- | <your_account>/docker alpine 965ea09ff2eb 2 weeks ago 5.55MB | + | <votre_compte>/ |
- | alpine latest 965ea09ff2eb 2 weeks ago 5.55MB | + | alpine |
- | mysql latest c8ee894bd2bd 3 weeks ago 456MB | + | mysql latest |
- | centos latest 0f3e07c0138f 5 weeks ago 220MB | + | centos |
</ | </ | ||
Ligne 1270: | Ligne 1464: | ||
< | < | ||
root@manager: | root@manager: | ||
+ | |||
root@manager: | root@manager: | ||
+ | |||
root@manager: | root@manager: | ||
+ | |||
root@manager: | root@manager: | ||
FROM docker/ | FROM docker/ | ||
Ligne 1321: | Ligne 1518: | ||
</ | </ | ||
- | <WRAP centre round important | + | <WRAP centre round important |
**Important** : Note the use of the same root key as when pushing the **< | **Important** : Note the use of the same root key as when pushing the **< | ||
</ | </ | ||
Ligne 1331: | Ligne 1528: | ||
< | < | ||
root@manager: | root@manager: | ||
+ | |||
root@manager: | root@manager: | ||
- | REPOSITORY TAG IMAGE ID CREATED SIZE | + | REPOSITORY |
- | <your_account>/docker nottrusted 686e85ee76b8 9 minutes ago 5.03MB | + | <votre_compte>/ |
- | <your_account>/ | + | <votre_compte>/ |
- | ubuntu latest 775349758637 9 days ago 64.2MB | + | ubuntu |
- | nginx latest 540a289bab6c 2 weeks ago 126MB | + | nginx latest |
- | <your_account>/docker alpine 965ea09ff2eb 2 weeks ago 5.55MB | + | <votre_compte>/ |
- | alpine latest 965ea09ff2eb 2 weeks ago 5.55MB | + | alpine |
- | mysql latest c8ee894bd2bd 3 weeks ago 456MB | + | mysql latest |
- | centos latest 0f3e07c0138f 5 weeks ago 220MB | + | centos |
- | docker/ | + | docker/ |
root@manager: | root@manager: | ||
Ligne 1356: | Ligne 1554: | ||
</ | </ | ||
- | <WRAP center round important | + | <WRAP center round important |
**Important**: | **Important**: | ||
</ | </ | ||
Ligne 1443: | Ligne 1641: | ||
</ | </ | ||
- | <WRAP centre round important | + | <WRAP centre round important |
**Important**: | **Important**: | ||
</ | </ | ||
Ligne 1484: | Ligne 1682: | ||
</ | </ | ||
- | <WRAP centre round important | + | <WRAP centre round important |
**Important** : Note that the keys used are different. | **Important** : Note that the keys used are different. | ||
</ | </ | ||
Ligne 1524: | Ligne 1722: | ||
</ | </ | ||
- | <WRAP center round important> | + | <WRAP center round important |
**Important**: | **Important**: | ||
</ | </ | ||
Ligne 1643: | Ligne 1841: | ||
</ | </ | ||
- | Modify the entry for address 10.0.2.61 in the manager' | + | Modify the entry for address 10.0.2.45 in the manager' |
< | < | ||
Ligne 1649: | Ligne 1847: | ||
root@manager: | root@manager: | ||
127.0.0.1 localhost | 127.0.0.1 localhost | ||
- | 10.0.2.60 debian9.i2tch.loc | + | 10.0.2.46 debian11.i2tch.loc |
- | 10.0.2.61 myregistry.i2tch.loc myregistry | + | 10.0.2.45 myregistry.i2tch.loc myregistry |
10.0.2.62 manager.i2tch.loc manager | 10.0.2.62 manager.i2tch.loc manager | ||
10.0.2.63 worker1.i2tch.loc worker1 | 10.0.2.63 worker1.i2tch.loc worker1 | ||
Ligne 1807: | Ligne 2005: | ||
====9.5 - Client configuration==== | ====9.5 - Client configuration==== | ||
- | Then transfer the CA certificate and the client certificate and private key to the **debian91** VM : | + | Then transfer the CA certificate and the client certificate and private key to the **10.0.2.45** VM : |
< | < | ||
- | root@manager: | + | root@manager: |
- | The authenticity of host ' | + | The authenticity of host ' |
ECDSA key fingerprint is SHA256: | ECDSA key fingerprint is SHA256: | ||
Are you sure you want to continue connecting (yes/no)? yes | Are you sure you want to continue connecting (yes/no)? yes | ||
- | Warning: Permanently added ' | + | Warning: Permanently added ' |
- | trainee@10.0.2.61's password: | + | trainee@10.0.2.45's password: |
- | ca.pem 100% 2163 917.8KB/s 00:00 | + | ca.pem |
- | key.pem 100% 3243 3.0MB/s 00:00 | + | key.pem |
- | cert.pem 100% 1907 921.7KB/s 00:00 | + | cert.pem |
</ | </ | ||
- | Run the **docker version** command on the **debian91** VM: | + | Run the **docker version** command on the **10.0.2.45** VM: |
< | < | ||
trainee@myregistry: | trainee@myregistry: | ||
Client: Docker Engine - Community | Client: Docker Engine - Community | ||
- | | + | |
- | API version: 1.40 | + | API version: |
- | Go version: go1.12.10 | + | Go version: |
Git commit: | Git commit: | ||
| | ||
- | | + | |
- | | + | |
Server: Docker Engine - Community | Server: Docker Engine - Community | ||
| | ||
- | Version: 19.03.4 | + | Version: |
- | API version: 1.40 (minimum version 1.12) | + | API version: |
- | Go version: go1.12.10 | + | Go version: |
Git commit: | Git commit: | ||
Built: | Built: | ||
- | OS/Arch: linux/ | + | OS/ |
- | Experimental: | + | Experimental: |
| | ||
- | Version: 1.2.10 | + | Version: |
- | GitCommit: b34a5c8af56e510852c35414db4c1f4fa6172339 | + | GitCommit: |
runc: | runc: | ||
- | Version: 1.0.0-rc8+dev | + | Version: |
GitCommit: | GitCommit: | ||
| | ||
- | Version: 0.18.0 | + | Version: |
- | GitCommit: fec3683 | + | GitCommit: |
</ | </ | ||
Ligne 1880: | Ligne 2078: | ||
< | < | ||
trainee@myregistry: | trainee@myregistry: | ||
- | REPOSITORY TAG IMAGE ID CREATED SIZE | + | REPOSITORY |
- | i2tch/ | + | i2tch/ |
- | i2tch/ | + | i2tch/ |
- | ubuntu latest 775349758637 10 days ago 64.2MB | + | ubuntu |
- | nginx latest 540a289bab6c 2 weeks ago 126MB | + | nginx |
- | alpine latest 965ea09ff2eb 2 weeks ago 5.55MB | + | alpine |
- | i2tch/ | + | i2tch/ |
- | mysql latest c8ee894bd2bd 3 weeks ago 456MB | + | mysql |
- | centos latest 0f3e07c0138f 5 weeks ago 220MB | + | centos |
- | docker/ | + | docker/ |
</ | </ | ||
----- | ----- | ||
- | Copyright © 2023 Hugh Norris. | + | Copyright © 2024 Hugh Norris. |