Skip to content
This repository was archived by the owner on Feb 10, 2021. It is now read-only.
This repository was archived by the owner on Feb 10, 2021. It is now read-only.

pypodman commit: option "--message" still does not work #14

Closed

Description

@Edward5hen

Is this a BUG REPORT or FEATURE REQUEST?:

kind bug

Description
After #1881, option --message still doesn't work. Probably because the option --format is not implemented and --message can be set only when --format has value docker, which can refer to https://github.com/containers/libpod/blob/master/docs/podman-commit.1.md:

--message, -m
Set commit message for committed image. The message field is not supported in oci format.

The argument --format/-f is not gotten from argparser, and --message should only be able to set when --format is docker:
https://github.com/jwhonce/libpod/blob/f8c5e75a10fb0a9a3a3c113075c129521c5c5099/contrib/python/podman/podman/libs/containers.py#L133-L137
https://github.com/jwhonce/libpod/blob/f8c5e75a10fb0a9a3a3c113075c129521c5c5099/contrib/python/podman/podman/libs/containers.py#L145-L146

Steps to reproduce the issue:
On Remote:

[root@rhel8-1 ~]# podman ps -a
CONTAINER ID   IMAGE                             COMMAND     CREATED       STATUS                   PORTS   NAMES         IS INFRA
5460b2b46177   docker.io/library/fedora:latest   /bin/bash   2 hours ago   Exited (0) 2 hours ago           test-commit   false

On Host:

  1. ~/.local/bin/pypodman -l root --host 192.168.122.213 commit --message "test commit msg" test-commit image-commited
  2. ~/.local/bin/pypodman -l root --host 192.168.122.213 commit --message "test commit msg" --format docker test-commit image-commited1

Describe the results you received:

  1. The image image-commited is created, but it has no comment message:
[root@rhel8-1 ~]# podman inspect image-commited
[
    {
        ......
        "Comment": "",
        ......
   }
]
  1. The image image-commited1 is created, but it still has the type oci(by default) and doesn't have the comment message too:
[root@rhel8-1 ~]# podman inspect image-commited1
[
    {
       ......
        "Comment": "", 
       ......
       "ManifestType": "application/vnd.oci.image.manifest.v1+json",
       ......
    }
]

Describe the results you expected:

  1. the command should fail.
    If I do this on remote with podman:
[root@rhel8-1 ~]# podman commit --message "test commit msg" test-commit image-commited
messages are only compatible with the docker image format (-f docker)
  1. If I do the same thing on remote with podman commit --message "test commit msg" --format docker test-commit image-commited2:
[root@rhel8-1 ~]# podman inspect image-commited2
[
    {
        ......
        "Comment": "test commit msg",
        ......
       "ManifestType": "application/vnd.docker.distribution.manifest.v2+json",
        ......
    }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions