-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Parse security_opts before sending them to docker daemon #7554
Conversation
6a37b45
to
d689a75
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for adding a test too!
I made a couple of test suggestions that you can follow up. I intend to merge by Tuesday end of my day either way. Thanks again.
func TestDockerDriver_SecurityOptFromFile(t *testing.T) { | ||
seccompPath := "./test-resources/docker/seccomp.json" | ||
|
||
if runtime.GOOS == "windows" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can also move the test to driver_unix_test.go
(or driver_linux_test.go
) instead if it doesn't apply to Windows. Does it apply to macOS?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly not sure. I copied the boiler plate from the existing seccomp=unconfined test. I would have thought even windows would run the container in a VM where seccomp applies but I have no good way to test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense - I'll test behavior!
Fixes hashicorp#6720 Copy the parsing function from the docker CLI. Docker daemon expects to see JSON for seccomp file not a path.
d689a75
to
a3c3f7e
Compare
Thank you so much @benbuzbee - this fix should be out in 0.11.0! |
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
Fixes #6720
Copy the parsing function from the docker CLI. Docker daemon expects to see JSON for seccomp file not a path.