TMAegisBeta
Thêm quy tắc cho docker

Docker

TMA-DOCKER-1.1.1

Ensure a separate partition for containers has been created

Trung bìnhCấp 1Tự độngdocker

Mô tả

Docker stores images and container data under its root directory (default /var/lib/docker); a separate partition stops containers filling the host root filesystem. The audit reads DockerRootDir from docker info and checks it is a mount point (mountpoint -q).

Cách kiểm tra

Phương pháp kiểm tra: Lệnh shell

shell
d=$(docker info --format '{{ .DockerRootDir }}') || exit 1; [ -n "$d" ] || exit 1; if mountpoint -q -- "$d"; then echo compliant; else echo "not a separate mount: $d"; fi
Đầu ra mong đợi
compliant

Cách khắc phục

Phương pháp khắc phục: Hướng dẫn hoặc bản vá hạ tầng

For new installations, you should create a separate partition for the /var/lib/docker mount point. For systems which have already been installed, you should use the Logical Volume Manager (LVM) within Linux to create a new partition.

Thuộc tính

Hệ điều hành
Bất kỳ
Thẻ
dockerhoststorage
Tham chiếu
CIS Docker Benchmark v1.9.0 - 1.1.1 Ensure a separate partition for containers has been created

Kiểm tra máy này

Chạy lệnh này trên máy bạn được phép kiểm tra. Lần quét chỉ ở chế độ đọc.

shell
tmaegis scan --target docker