summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2022-08-17 12:44:42 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2022-08-17 12:44:42 -0400
commitd50ff4f512856907982e1ebb92d60fc7980f730e (patch)
treee6d08dadf1e44ca84f27a19e9228c6717a6e0509
parentf70c9cd78bd377ddc01acc67f00af38325f40edd (diff)
downloadpodman-d50ff4f512856907982e1ebb92d60fc7980f730e.tar.gz
podman-d50ff4f512856907982e1ebb92d60fc7980f730e.tar.bz2
podman-d50ff4f512856907982e1ebb92d60fc7980f730e.zip
Add podman secret create -d as alias for --driver for Docker compatibility
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
-rw-r--r--cmd/podman/secrets/create.go2
-rw-r--r--docs/source/markdown/podman-secret-create.1.md2
-rw-r--r--test/e2e/secret_test.go2
3 files changed, 3 insertions, 3 deletions
diff --git a/cmd/podman/secrets/create.go b/cmd/podman/secrets/create.go
index 8ecfecf69..01775f563 100644
--- a/cmd/podman/secrets/create.go
+++ b/cmd/podman/secrets/create.go
@@ -46,7 +46,7 @@ func init() {
cfg := registry.PodmanConfig()
- flags.StringVar(&createOpts.Driver, driverFlagName, cfg.Secrets.Driver, "Specify secret driver")
+ flags.StringVarP(&createOpts.Driver, driverFlagName, "d", cfg.Secrets.Driver, "Specify secret driver")
flags.StringToStringVar(&createOpts.DriverOpts, optsFlagName, cfg.Secrets.Opts, "Specify driver specific options")
_ = createCmd.RegisterFlagCompletionFunc(driverFlagName, completion.AutocompleteNone)
_ = createCmd.RegisterFlagCompletionFunc(optsFlagName, completion.AutocompleteNone)
diff --git a/docs/source/markdown/podman-secret-create.1.md b/docs/source/markdown/podman-secret-create.1.md
index e08afb388..39e0c6843 100644
--- a/docs/source/markdown/podman-secret-create.1.md
+++ b/docs/source/markdown/podman-secret-create.1.md
@@ -20,7 +20,7 @@ Secrets will not be committed to an image with `podman commit`, and will not be
## OPTIONS
-#### **--driver**=*driver*
+#### **--driver**, **-d**=*driver*
Specify the secret driver (default **file**, which is unencrypted).
diff --git a/test/e2e/secret_test.go b/test/e2e/secret_test.go
index ed328d84a..f557aaaa0 100644
--- a/test/e2e/secret_test.go
+++ b/test/e2e/secret_test.go
@@ -40,7 +40,7 @@ var _ = Describe("Podman secret", func() {
err := ioutil.WriteFile(secretFilePath, []byte("mysecret"), 0755)
Expect(err).To(BeNil())
- session := podmanTest.Podman([]string{"secret", "create", "--driver-opts", "opt1=val", "a", secretFilePath})
+ session := podmanTest.Podman([]string{"secret", "create", "-d", "file", "--driver-opts", "opt1=val", "a", secretFilePath})
session.WaitWithDefaultTimeout()
secrID := session.OutputToString()
Expect(session).Should(Exit(0))