Skip to content

Commit

Permalink
Add --config for Docker compatibility
Browse files Browse the repository at this point in the history
Fixes: containers#14767

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
  • Loading branch information
rhatdan committed Sep 7, 2022
1 parent 3d482a7 commit b52cc3e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/podman/root.go
Expand Up @@ -363,6 +363,8 @@ func rootFlags(cmd *cobra.Command, opts *entities.PodmanConfig) {
lFlags.StringVarP(&opts.URI, "host", "H", uri, "Used for Docker compatibility")
_ = lFlags.MarkHidden("host")

lFlags.String("config", "", "Ignored for Docker compatibility")
_ = lFlags.MarkHidden("config")
// Context option added just for compatibility with DockerCLI.
lFlags.String("context", "default", "Name of the context to use to connect to the daemon (This flag is a NOOP and provided solely for scripting compatibility.)")
_ = lFlags.MarkHidden("context")
Expand Down
3 changes: 3 additions & 0 deletions test/system/001-basic.bats
Expand Up @@ -29,6 +29,9 @@ function setup() {
local built=$(expr "$output" : ".*Built: \+\(.*\)" | head -n1)
local built_t=$(date --date="$built" +%s)
assert "$built_t" -gt 1546300800 "Preposterous 'Built' time in podman version"

run_podman --config foobar -v
is "$output" "$(basename $PODMAN) version \+" "'Version line' in output"
}

@test "podman info" {
Expand Down

0 comments on commit b52cc3e

Please sign in to comment.