aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-09-09 13:17:14 +0200
committerGitHub <noreply@github.com>2022-09-09 13:17:14 +0200
commite37dd95b7a7839865f9259e5bc91db3dfd175daa (patch)
tree2708e1790a0e1c9e7cc3863baf9c779da730a504 /cmd/podman
parentf24bdeef268ad769707e12c1a4010b98e9b8de93 (diff)
parent1994f382320e627a91e9c510d868c81dd17866bb (diff)
downloadpodman-e37dd95b7a7839865f9259e5bc91db3dfd175daa.tar.gz
podman-e37dd95b7a7839865f9259e5bc91db3dfd175daa.tar.bz2
podman-e37dd95b7a7839865f9259e5bc91db3dfd175daa.zip
Merge pull request #15658 from rhatdan/config
Add --config for Docker compatibility
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/root.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/cmd/podman/root.go b/cmd/podman/root.go
index 0261cd670..2e00777a4 100644
--- a/cmd/podman/root.go
+++ b/cmd/podman/root.go
@@ -73,6 +73,7 @@ var (
defaultLogLevel = "warn"
logLevel = defaultLogLevel
+ dockerConfig = ""
debug bool
useSyslog bool
@@ -85,6 +86,7 @@ func init() {
loggingHook,
syslogHook,
earlyInitHook,
+ configHook,
)
rootFlags(rootCmd, registry.PodmanConfig())
@@ -311,6 +313,12 @@ func persistentPostRunE(cmd *cobra.Command, args []string) error {
return nil
}
+func configHook() {
+ if dockerConfig != "" {
+ logrus.Warn("The --config flag is ignored by Podman. Exists for Docker compatibility")
+ }
+}
+
func loggingHook() {
var found bool
if debug {
@@ -363,6 +371,8 @@ func rootFlags(cmd *cobra.Command, opts *entities.PodmanConfig) {
lFlags.StringVarP(&opts.URI, "host", "H", uri, "Used for Docker compatibility")
_ = lFlags.MarkHidden("host")
+ lFlags.StringVar(&dockerConfig, "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")