Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LCOW: --platform on import (already in API) #1371

Merged
merged 1 commit into from
Sep 14, 2018

Conversation

lowenna
Copy link
Contributor

@lowenna lowenna commented Sep 13, 2018

Signed-off-by: John Howard jhoward@microsoft.com

A tester here found import doesn't work for LCOW. No idea how I missed this - it's in the API, just not in the CLI. As the tar generated in export doesn't have any indication of platform, it needs to be explicit. See how in the before-fix case, it's going down the WCOW route (windowsfilter),

Before:

PS E:\> docker import test.tar
Error response from daemon: re-exec error: exit status 1: output: ProcessBaseLayer \\?\C:\control\windowsfilter\db15e89fc696ce2b7e8a9c7ee328553690cec3558fd01cb843c837b230e2e1f2: The system cannot find the path specified.

After:

PS E:\> docker import --platform=linux test.tar
sha256:f68c6c11dcd5f4b4bbdc71d07fb5712325b00ffaa546ec868a0775bd8d62d20a

@silvin-lubecki
Copy link
Contributor

Copy link
Contributor

@silvin-lubecki silvin-lubecki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with the doc updated

@lowenna
Copy link
Contributor Author

lowenna commented Sep 13, 2018

Which repo are the docs in again?

Oh NVM, they are here. I could have sworn they were in a separate repo. Or is that just the engine?

Signed-off-by: John Howard <jhoward@microsoft.com>
@lowenna
Copy link
Contributor Author

lowenna commented Sep 13, 2018

Updated docs.

@silvin-lubecki
Copy link
Contributor

Thank you @jhowardmsft for this PR!

Copy link
Collaborator

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🐯
cc @thaJeztah

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For future reference (and save some digging); command.AddPlatformFlag() also sets the annotations for API-version and "experimental" being enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants