summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorTomSweeneyRedHat <tsweeney@redhat.com>2018-01-31 18:16:50 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-02-01 14:43:54 +0000
commit03cfe5ebbee306ee4aa84c74bbff83712e50fb1c (patch)
treed5487b66dec29fc00bd79781a70ea7221147bca1 /cmd/podman
parent2dfd048545d1def4b805a785f7259fc8f1fca22e (diff)
downloadpodman-03cfe5ebbee306ee4aa84c74bbff83712e50fb1c.tar.gz
podman-03cfe5ebbee306ee4aa84c74bbff83712e50fb1c.tar.bz2
podman-03cfe5ebbee306ee4aa84c74bbff83712e50fb1c.zip
Add authfile, cert-dir and creds params to build
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com> Closes: #280 Approved by: mheon
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/build.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/cmd/podman/build.go b/cmd/podman/build.go
index 0defb5e79..6e32a80e9 100644
--- a/cmd/podman/build.go
+++ b/cmd/podman/build.go
@@ -11,10 +11,24 @@ import (
var (
buildFlags = []cli.Flag{
+ cli.StringFlag{
+ Name: "authfile",
+ Usage: "path of the authentication file. Default is ${XDG_RUNTIME_DIR}/containers/auth.json",
+ },
cli.StringSliceFlag{
Name: "build-arg",
Usage: "`argument=value` to supply to the builder",
},
+ cli.StringFlag{
+ Name: "cert-dir",
+ Value: "",
+ Usage: "use certificates at the specified path to access the registry",
+ },
+ cli.StringFlag{
+ Name: "creds",
+ Value: "",
+ Usage: "use `[username[:password]]` for accessing the registry",
+ },
cli.StringSliceFlag{
Name: "file, f",
Usage: "`pathname or URL` of a Dockerfile",
@@ -68,9 +82,18 @@ func buildCmd(c *cli.Context) error {
budCmdArgs := []string{"bud"}
+ if c.IsSet("authfile") {
+ budCmdArgs = append(budCmdArgs, "--authfile", c.String("authfile"))
+ }
for _, buildArg := range c.StringSlice("build-arg") {
budCmdArgs = append(budCmdArgs, "--build-arg", buildArg)
}
+ if c.IsSet("cert-dir") {
+ budCmdArgs = append(budCmdArgs, "--cert-dir", c.String("cert-dir"))
+ }
+ if c.IsSet("creds") {
+ budCmdArgs = append(budCmdArgs, "--creds", c.String("creds"))
+ }
for _, fileName := range c.StringSlice("file") {
budCmdArgs = append(budCmdArgs, "--file", fileName)
}