The Wayback Machine - https://web.archive.org/web/20251014201434/https://github.com/docker/cli/pull/1371
Skip to content

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

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.

5 participants