Skip to content

Commit

Permalink
Added label flag to build.
Browse files Browse the repository at this point in the history
  • Loading branch information
DeanHnter committed Feb 6, 2024
1 parent da271b4 commit ab3039d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Client/cmd/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ var (
buildOptions shared.BuildOptions // global variable to hold build options
username string
password string
labels []string
)

// DockerCLI provides methods which execute docker commands.
Expand Down Expand Up @@ -131,6 +132,7 @@ func init() {
RootCmd.AddCommand(pullCmd)
RootCmd.AddCommand(inspectCmd)
buildCmd.Flags().StringArrayVarP(&buildOptions.Tags, "tag", "t", []string{}, "Name and optionally a tag in the 'name:tag' format")
buildCmd.Flags().StringArrayVar(&labels, "label", []string{}, "Set metadata for an image")
buildCmd.Flags().StringP("file", "f", "Dockerfile", "Name of the Dockerfile")
loginCmd.Flags().StringVarP(&username, "username", "u", "", "Username for registry authentication")
loginCmd.Flags().StringVarP(&password, "password", "p", "", "Password for registry authentication")
Expand Down

0 comments on commit ab3039d

Please sign in to comment.