Skip to content

Commit

Permalink
LCOW: --platform on import (already in API)
Browse files Browse the repository at this point in the history
Signed-off-by: John Howard <jhoward@microsoft.com>
  • Loading branch information
John Howard committed Sep 13, 2018
1 parent ce4a9f8 commit 6ff72cf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cli/command/image/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ type importOptions struct {
reference string
changes dockeropts.ListOpts
message string
platform string
}

// NewImportCommand creates a new `docker import` command
Expand All @@ -43,6 +44,7 @@ func NewImportCommand(dockerCli command.Cli) *cobra.Command {
options.changes = dockeropts.NewListOpts(nil)
flags.VarP(&options.changes, "change", "c", "Apply Dockerfile instruction to the created image")
flags.StringVarP(&options.message, "message", "m", "", "Set commit message for imported image")
command.AddPlatformFlag(flags, &options.platform)

return cmd
}
Expand Down Expand Up @@ -71,8 +73,9 @@ func runImport(dockerCli command.Cli, options importOptions) error {
}

importOptions := types.ImageImportOptions{
Message: options.message,
Changes: options.changes.GetAll(),
Message: options.message,
Changes: options.changes.GetAll(),
Platform: options.platform,
}

clnt := dockerCli.Client()
Expand Down

0 comments on commit 6ff72cf

Please sign in to comment.