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

podman commit with different mandatory parameter than docker commit #5027

Closed
loibpet opened this issue Jan 30, 2020 · 3 comments · Fixed by #5028
Closed

podman commit with different mandatory parameter than docker commit #5027

loibpet opened this issue Jan 30, 2020 · 3 comments · Fixed by #5028
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@loibpet
Copy link

loibpet commented Jan 30, 2020

/kind bug

Description

Ran into this problem, when I was checking if scripts developed for docker were running with podman.

podman supposed to be compatible to docker in terms of parameters. However, there are still breaking differences:

docker --version && docker commit --help
Docker version 1.13.1, build 07f3374/1.13.1

Usage:  docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]

Create a new image from a container's changes

Options:
  -a, --author string    Author (e.g., "John Hannibal Smith <hannibal@a-team.com>")
  -c, --change list      Apply Dockerfile instruction to the created image (default [])
      --help             Print usage
  -m, --message string   Commit message
  -p, --pause            Pause container during commit (default true)

whereas:

podman --version && podman commit --help
podman version 1.7.0
Create new image based on the changed container

Description:
Create an image from a container's changes. Optionally tag the image created, set the author with the --author flag, set the commit message with the --message flag, and make changes to the instructions with the --change flag.

Usage:
  podman commit [flags] CONTAINER IMAGE

Examples:
  podman commit -q --message "committing container to image" reverent_golick image-committed
  podman commit -q --author "firstName lastName" reverent_golick image-committed
  podman commit -q --pause=false containerID image-committed

Flags:
  -a, --author string        Set the author for the image committed
  -c, --change stringArray   Apply the following possible instructions to the created image (default []): CMD | ENTRYPOINT | ENV | EXPOSE | LABEL | ONBUILD | STOPSIGNAL | USER | VOLUME | WORKDIR
  -f, --format Format        Format of the image manifest and metadata (default "oci")
      --include-volumes      Include container volumes as image volumes
  -m, --message string       Set commit message for imported image
  -p, --pause                Pause container during commit
  -q, --quiet                Suppress output

The issue the second mandatory parameter (IMAGE) for the podman command. This breaks any compatibility.

Describe the results you expected:

No additional mandatory parameter for parameter inherited from docker.

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jan 30, 2020
@mheon
Copy link
Member

mheon commented Jan 30, 2020

@baude I remember we added this one waaaay back to solve a problem we were having... I want to say when we moved to using buildah commit?

@TomSweeneyRedHat Can buildah commit without a tag? We're using your code, so if you can, we ought to be able to

@baude
Copy link
Member

baude commented Jan 30, 2020

@mheon the cli should be able to do this. lemme check.

@baude baude self-assigned this Jan 30, 2020
@TomSweeneyRedHat
Copy link
Member

Buildah's commit doesn't require an image or tag, both are optional.

buildah commit [options] container [image]

baude added a commit to baude/podman that referenced this issue Jan 30, 2020
to match docker compat, the image tag should be optional.

Fixes: containers#5027

Signed-off-by: Brent Baude <bbaude@redhat.com>
sujil02 pushed a commit to sujil02/podman that referenced this issue Feb 7, 2020
to match docker compat, the image tag should be optional.

Fixes: containers#5027

Signed-off-by: Brent Baude <bbaude@redhat.com>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants