Unable to get seccomp=unconfined working via API

When I try to pass in SecurityOpts: []string{"seccomp=unconfined"},

It does not appear to work. dlv debug fails with:

vscode@ebd05beac9de:~/nut$ dlv debug
could not launch process: fork/exec ./debug: operation not permitted

However, it works fine when I pass in the --security-opt seccomp=unconfined to docker run.

I’m using beta8. Any ideas why that API option isn’t working?

Fixed. I had to set SecurityOpt in HostConfig rather than Config.

For anyone else hitting this problem in future, I was getting the same thing and realized that the issue was setting HostConfig on RunContainer, when the container had been previously created with CreateContainer. The HostConfig needs to be set on CreateContainer, because afterwards RunContainer has no effect.