-
Notifications
You must be signed in to change notification settings - Fork 5.4k
security_opt seems to be doing nothing #5169
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
Comments
This example works fine for me: version: '2.3'
networks:
backend:
services:
example:
build: .
command: "dlv debug --listen=:2345 --headless --log /cmd/main.go"
security_opt:
- seccomp:unconfined
networks:
- backend
ports:
- "5002:5002"
Try checking the output of |
Closing, but feel free to update if you're still having issues. |
@shin- I am trying to run strace within a docker container and this used to work, but now I am getting When I inspect the container I do see that it's set properly: I have this on my containers block under docker-compose.yml: Thoughts? |
@Hudspeth You might need cap_add:
- SYS_PTRACE as well, according to moby/moby#21051 |
Now I have: core-app:
environment:
<<: *default_environment
expose:
- '5005'
ports:
- '5019:5005'
cap_add:
- SYS_PTRACE
security_opt:
- seccomp:unconfined
- apparmor:unconfined` docker inspect showing:
Still same error as above. |
The following works fine for me: # cat docker-compose.yml
version: '2.3'
services:
foo:
command: strace /bin/ls
build: .
cap_add:
- SYS_PTRACE
security_opt:
- seccomp:unconfined
Based on the official ubuntu image with |
Ya I think what I was expecting was for this to work at build time on the images. But this setting is for live containers that are actively running. All good. |
Error response from daemon: error while creating mount source path '/host_mnt/Users/xxxxx/server/redis': mkdir /host_mnt/Users/hunaghongbin: operation not permitted
I hope to solve this song problem,think! |
I need to be able fork a process. As i understand it i need to set the security-opt. I have tried doing this with docker command and it works fine. However when i do this in a docker-compose file it seem to do nothing, maybe I'm not using compose right.
Docker
docker run --security-opt=seccomp:unconfined <id> dlv debug --listen=:2345 --headless --log ./cmd/main.go
Docker-compose
Setup
docker-compose.yml
Dockerfile
command
docker-compose -f docker-compose.yml up --build --abort-on-container-exit
Result
The text was updated successfully, but these errors were encountered: