Add /etc/hostname fix for macOS

This commit is contained in:
Garett Dunn 2021-10-01 11:39:17 -04:00 committed by GitHub
parent 1891eaa8b3
commit 8ac4513d24
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -57,10 +57,12 @@ docker run --rm --net host --pid host --userns host --cap-add audit_control \
docker/docker-bench-security docker/docker-bench-security
``` ```
2. `Docker Desktop` on macOS doesn't have `/usr/lib/systemd` or the above Docker 2. The /etc/hostname file is missing on macOS, so it will need to be created first. Also, `Docker Desktop` on macOS doesn't have `/usr/lib/systemd` or the above Docker
binaries. binaries.
```sh ```sh
sudo touch /etc/hostname
docker run --rm --net host --pid host --userns host --cap-add audit_control \ docker run --rm --net host --pid host --userns host --cap-add audit_control \
-e DOCKER_CONTENT_TRUST=$DOCKER_CONTENT_TRUST \ -e DOCKER_CONTENT_TRUST=$DOCKER_CONTENT_TRUST \
-v /etc:/etc \ -v /etc:/etc \