DockerCLI/cli
Sebastiaan van Stijn 6d0aa0a52d
cli/command/container: parseSecurityOpts: fix --security-opt seccomp=builtin
Docker v23.0 and up allow the daemon to be configured to have seccomp disabled
by default (using the "unconfined" profile as default), and introduced a new
"builtin" profile-name for the default (see [moby@f8795ed364586acd][1] and
[mnoby@ac449d6b5ad29a50][2]).

However, the CLI had no special handling for the "builtin" profile, which
resulted in it trying to load it as a file, which would fail;

    docker run -it --rm --security-opt seccomp=builtin busybox
    docker: opening seccomp profile (builtin) failed: open builtin: no such file or directory.
    See 'docker run --help'.

This patch adds a special case for the "builtin" profile, to allow using the
default profile on daemons with seccomp disabled (unconfined) by default.

[1]: f8795ed364
[2]: ac449d6b5a

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-01-05 12:19:00 +01:00
..
command cli/command/container: parseSecurityOpts: fix --security-opt seccomp=builtin 2024-01-05 12:19:00 +01:00
compose add //go:build directives to prevent downgrading to go1.16 language 2023-12-14 15:03:46 +01:00
config golangci-lint: enable thelper linter 2023-11-20 16:02:17 +01:00
connhelper golangci-lint: enable more linters 2023-11-20 19:52:46 +01:00
context add //go:build directives to prevent downgrading to go1.16 language 2023-12-14 15:03:46 +01:00
debug updated vendoring 2017-09-01 19:41:06 -04:00
flags cli: move "config" flag to cli/flags/ClientOptions.InstallFlags() 2023-06-28 16:04:09 +02:00
hints login: Add message about using PATs 2023-08-03 10:35:04 +02:00
manifest linting: address assorted issues found by gocritic 2023-11-20 16:02:16 +01:00
registry/client migrate reference github.com/distribution/reference 2023-09-05 17:53:20 +02:00
streams cli/streams: minor refactoring and docs touch-ups 2023-04-03 11:27:26 +02:00
trust golangci-lint: enable dupword linter 2023-11-20 16:02:18 +01:00
version Move versioning variables to a separate package. 2019-01-29 11:26:40 +00:00
winresources Use goversioninfo to create Windows Version Info 2021-10-11 16:54:22 +02:00
cobra.go cli/command: merge DockerCliOption and InitializeOpt types 2023-12-12 15:01:36 +01:00
cobra_test.go cli: use custom annotation for aliases 2022-06-28 17:32:09 +02:00
error.go Import docker/docker/cli 2017-04-17 17:40:59 -04:00
required.go format (GoDoc) comments with Go 1.19 to prepare for go updates 2022-07-19 19:10:16 +02:00
required_test.go golangci-lint: enable thelper linter 2023-11-20 16:02:17 +01:00