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

Make the "docker-archive" format of "podman save" OCI-compatible following Docker 25 release #21347

Open
Romain-Geissler-1A opened this issue Jan 24, 2024 · 5 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. stale-issue

Comments

@Romain-Geissler-1A
Copy link
Contributor

Feature request description

Following docker 25 release, "docker image save" now seems to use OCI archive format by default (see release notes https://docs.docker.com/engine/release-notes/25.0/ and moby/moby#44598).

For other reasons (see #20611 containers/image#2151 and containers/image#2182) we might prefer OCI format by default for "podman save" rather than docker format.

So both to align with the latest docker behavior and to favor OCI over docker format, should we change the default output format of "podman save" from "docker-archive" to "oci-archive" ?

Suggest potential solution

Change the default output of "podman save" to "oci-archive".

Have you considered any alternatives?

No response

Additional context

No response

@Romain-Geissler-1A Romain-Geissler-1A added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 24, 2024
@rhatdan
Copy link
Member

rhatdan commented Jan 24, 2024

Seems like something that should be done for 5.0.

rhatdan added a commit to rhatdan/podman that referenced this issue Jan 31, 2024
Fixes: containers#21347

This is a breaking change.

Signed-off-by: Daniel J Walsh <[email protected]>
@mtrmac
Copy link
Collaborator

mtrmac commented Feb 5, 2024

For reference, ~copying my comment from #21355:


We actually don’t want to just switch the format.

Docker 25 is doing something more interesting: they are creating a single archive which is consumable both as an OCI archive and as a traditional docker-archive (mostly? There are actually two docker-archive formats, and IIRC the older one is conceptually incompatible with OCI, so the generated archive is probably OCI + “new” docker-archive)

Creating such a hybrid archive in podman save would be interesting. Just switching to OCI would make the output no longer compatible with old docker load, and thus not in line with the Podman/Docker CLI compatibility ambition.

@Romain-Geissler-1A
Copy link
Contributor Author

Romain-Geissler-1A commented Feb 6, 2024

Hi,

In practice, since this issue is rather important to us (Amadeus), I guess I will end up trying to implement it. Let's say the current docker 25 format is implemented (this is purely internal podman matter), from a user point of view how do you see the command line interface ?

  • We move the "old" docker format under the new name --format=legacy-docker-archive, the "new" docker archive will be useable under the existing default name --format=docker-archive.
  • Or we don't change anything to current podman behavior, but we implement the new docker format under a new name --format=new-docker-archive.
  • Or we drop entirely the current podman code for the "old" docker archive format, and we replace it with the "new" docker archive format

@mtrmac
Copy link
Collaborator

mtrmac commented Feb 6, 2024

(That’s not quite how that works, the code to create the archives exists in containers/image behind a transport abstraction: https://github.com/containers/image/blob/main/docs/containers-transports.5.md . So that choice should be expressible in c/image, either by creating a new transport, with the associated code duplication, or by adding an option to the existing docker-archive format. Afterwards, Podman can choose how to expose that functionality/option.)

I think the first thing is to confirm for sure whether the combined OCI+new-Docker format is, or isn’t, compatible with old-Docker; my text above is just what I remember from a fairly brief skim of the new Docker code; and the new Docker code does seem to still create the legacy data, although I can’t see how it is actually consumable.

It might be the case that there isn’t any incompatibility, and that we can always generate an archive that is valid in all three formats simultaneously. In that case I think we should just do that, and not burden the user with questions.

The design trade-offs only come into play if the three-format archive is impossible.

Copy link

github-actions bot commented Mar 8, 2024

A friendly reminder that this issue had no activity for 30 days.

@mtrmac mtrmac changed the title Switch default format of "podman save" to "oci-archive" following Docker 25 release Make the "docker-archive" format of "podman save" OCI-compatible following Docker 25 release May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. stale-issue
Projects
None yet
Development

No branches or pull requests

3 participants