-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running docker-bench-security under WSL1 #446
Comments
Seems to build OK...
However still doesn't run, and gives the same weird error message....
So, I guess that's a WSL1 problem. When I run the script alone, it seems to be fine 👍
So, I think it makes sense to close this issue (unless you have other suggestions?) . Thanks for your help. |
Does |
/var/lib/docker does not exist. So, yes I guess that's the problem. |
I guess all paths need to be corrected under WSL, I haven't used |
Can docker bench security script be run on windows host which has a WSL 1 or 2? If yes then the findings observed do they need to be patched for windows host or the WSL2 linux system? |
Related #261 |
Hi,
I'm trying to run under WSL1 (can't upgrade to WSL2 just yet) using these instructions https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly. Seems to work OK, and gives hello-world is working OK. However, when I try to run docker-bench-security, under Ubuntu 18.04 (under WSL)...
docker run -it --net host --pid host --userns host --cap-add audit_control -e DOCKER_CONTENT_TRUST=$DOCKER_CONTENT_TRUST -v /etc:/etc:ro -v /lib/systemd/system:/lib/systemd/system:ro -v /usr/bin/containerd:/usr/bin/containerd:ro -v /usr/bin/runc:/usr/bin/runc:ro -v /usr/lib/systemd:/usr/lib/systemd:ro -v /var/lib:/var/lib:ro -v /var/run/docker.sock:/var/run/docker.sock:ro --label docker_bench_security docker/docker-bench-security
I get the following error.
docker: Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "process_linux.go:449: container init caused \"rootfs_linux.go:58: mounting \\\"/var/lib/docker/containers/33b215e1abbbf3493dc0a2717e4c1b8ce4f747a60681f5b318fdf7b4516624da/hostname\\\" to rootfs \\\"/var/lib/docker/overlay2/fc341fa540cf7cc0af3c1c39a1453adbbfbc89d6a0ac52db65b280453eedd25d/merged\\\" at \\\"/var/lib/docker/overlay2/fc341fa540cf7cc0af3c1c39a1453adbbfbc89d6a0ac52db65b280453eedd25d/merged/etc/hostname\\\" caused \\\"open /var/lib/docker/overlay2/fc341fa540cf7cc0af3c1c39a1453adbbfbc89d6a0ac52db65b280453eedd25d/merged/etc/hostname: read-only file system\\\"\"": unknown. ERRO[0001] error waiting for container: context canceled
Perhaps this is more of a WSL problem than docker-bench-security?? Any pointers would be much appreciated.
The text was updated successfully, but these errors were encountered: