podman-py icon indicating copy to clipboard operation
podman-py copied to clipboard

SELinux `security-opt` parameter is not showing upon inspect container

Open Amizzuddin opened this issue 2 years ago • 1 comments

Hi, I have notice when "security_opt" parameter is supply as run(), parameter is not not reflecting in container. Here are some information:

  1. Details of run() command: run_command.txt Screenshot from 2023-11-16 07-45-41

  2. Detail of HostConfig from podman inspect <container_name>: HostConfig.json Screenshot from 2023-11-16 07-46-15

Also I use the following code comments for available parameters as well as parameters to podman_config. I did print of the values and notice that the parameters did pass but somehow when I perform inspect to the container SecurityOptis not set. Kindly do advise how can I get the SecurityOpt set.

REMARK: Just an extra information, when I run the container the cli or compose method, I do not face the same issue.

Thank you so much for the development of podman-py and l look into this issue. Looking forward for your advice.

Amizzuddin avatar Nov 15 '23 23:11 Amizzuddin

not sure if this is relevant, podman api seems only have

selinux_opts | Array of stringsSelinuxProcessLabel is the process label the container will use. If SELinux is enabled and this is not specified, a label will be automatically generated if not specified. Optional. -- | --

but if we go to podman docker compat api: https://docs.podman.io/en/latest/_static/api.html#tag/containers-(compat)/operation/ContainerCreate there is SecurityOpt in the payload

remind me something https://github.com/vv9k/podman-api-rs/issues/106

NerdToMars avatar Dec 05 '24 06:12 NerdToMars