Podman commands

Podman for IBM® z/OS® (Podman) is a utility to make it easy to find, run, build, share, and deploy containerized applications.

See Table 1 to find out which Podman commands are supported for IBM z/OS Container Platform (zOSCP) and Tables 2 - 9 to find out which Podman commands and options are not supported.

The version of Podman in zOSCP is 5.4.1.

Supported Podman commands

Supported

Table 1. Podman commands that are supported for use with IBM z/OS Container Platform
Command Alias Function Any restrictions or special conditions for IBM z/OS Container Platform Podman documentation
Supported podman container attach podman attach Attach to a running container. See Unsupported flag options podman container attachLink leaves IBM Docs
Supported podman container cleanup   Clean up the container’s network and mountpoints.   podman container cleanupLink leaves IBM Docs
Supported podman container clone   Create a copy of an existing container.   podman container cloneLink leaves IBM Docs
Supported podman container commit podman commit Create new image based on the changed container.   podman container commitLink leaves IBM Docs
Supported podman container cp podman cp Copy files/folders between a container and the local filesystem.   podman container cpLink leaves IBM Docs
Supported podman container create podman create Create a new container.
--tmpfs
Updated options specific to tmpfs:
--mount
Unsupported options specific to mount TYPEs:
  • Unsupported image
  • Unsupported devpts
Unsupported options specific to volume:
  • Unsupported idmap
Unsupported options specific to bind:
  • Unsupportedbind-propagation: shared, slave, rshared and rslave
  • Unsupported relabel
  • Unsupported idmap
--secret
Unsupported secret options:
  • Unsupported uid=0
  • Unsupported gid=0
--volume
Unsupported options:
  • Unsupported z|Z
  • Unsupported [O]
  • Unsupported [no]dev
  • Unsupported [no]exec
  • [r]shared|[r]slave
  • Unsupported idmap[=options]

See Unsupported flag options

podman container createLink leaves IBM Docs
Supported podman container diff podman diff Inspect changes on a container’s filesystem.   podman container diffLink leaves IBM Docs
Supported podman container exec podman exec Execute a command in a running container.   podman container execLink leaves IBM Docs
Supported podman container exists   Check if a container exists in local storage.   podman container existsLink leaves IBM Docs
Supported podman container export podman export Export a container’s filesystem contents as a tar archive.   podman container exportLink leaves IBM Docs
Supported podman container init podman init Initialize a container.   podman container initLink leaves IBM Docs
Supported podman container inspect podman inspect Display a container’s configuration.   podman container inspectLink leaves IBM Docs
Supported podman container kill podman kill Kill the main process in one or more containers.   podman container killLink leaves IBM Docs
Supported podman container list   List the containers on the system.   podman container psLink leaves IBM Docs
Supported podman container logs podman logs Display the logs of a container.   podman container logsLink leaves IBM Docs
Supported podman container mount podman mount Mount a working container’s root filesystem. Mounts the specified containers' root file system in a location which can be accessed from the mount namespace via the podman unshare command, and returns its location.

Podman lists all of the currently mounted containers, including external containers, when the command is executed without any arguments. External containers are containers in container/storage by tools other than Podman.

Rootless mode supports mounting UFS driver too.

podman container mountLink leaves IBM Docs
Supported podman container prune   Remove all stopped containers from local storage.   podman container pruneLink leaves IBM Docs
Supported podman container ps podman ps Print out information about containers.   podman container psLink leaves IBM Docs
Supported podman container rename podman rename Rename an existing container.   podman container renameLink leaves IBM Docs
Supported podman container restart podman restart Restart one or more containers.   podman container restartLink leaves IBM Docs
Supported podman container rm podman rm Remove one or more containers.   podman container rmLink leaves IBM Docs
Supported podman container run podman run Run a command in a container.
--tmpfs
Updated options specific to tmpfs:
--mount
Unsupported options specific to mount TYPEs:
  • Unsupported image
  • Unsupported devpts
Unsupported options specific to volume:
  • Unsupported idmap
Unsupported options specific to bind:
  • Unsupportedbind-propagation: shared, slave, rshared and rslave
  • Unsupported relabel
  • Unsupported idmap
--secret
Unsupported secret options:
  • Unsupported uid=0
  • Unsupported gid=0
--volume
Unsupported options:
  • Unsupported z|Z
  • Unsupported [O]
  • Unsupported [no]dev
  • Unsupported [no]exec
  • [r]shared|[r]slave
  • Unsupported idmap[=options]

See Unsupported flag options

podman container runLink leaves IBM Docs
Supported podman container runlabel   Execute a command as described by a container-image label.   podman container runlabelLink leaves IBM Docs
Supported podman container start podman start Start one or more containers.   podman container startLink leaves IBM Docs
Supported podman container stop podman stop Stop one or more running containers.   podman container stopLink leaves IBM Docs
Supported podman container unmount podman unmount Unmount a working container’s root filesystem.   podman container unmountLink leaves IBM Docs
Supported podman container wait podman wait Wait on one or more containers to stop and print their exit codes.   podman container waitLink leaves IBM Docs
Supported podman events   Monitor Podman events.   podman eventsLink leaves IBM Docs
Supported podman image build podman build Build a container using a Dockerfile.   podman buildLink leaves IBM Docs
Supported podman image diff podman diff Inspect changes on an image’s filesystem.   podman image diffLink leaves IBM Docs
Supported podman image exists   Check if an image exists in local storage.   podman image existsLink leaves IBM Docs
Supported podman image history podman history Show the history of an image.   podman image historyLink leaves IBM Docs
Supported podman image import podman import Import a tarball and save it as a filesystem image.   podman image importLink leaves IBM Docs
Supported podman image inspect podman inspect Display an image’s configuration.   podman image inspectLink leaves IBM Docs
Supported podman image list podman images List the container images on the system.   podman image listLink leaves IBM Docs
Supported podman image load podman load Load an image from the docker archive.   podman image loadLink leaves IBM Docs
Supported podman image mount   Mount an image’s root filesystem. Mounts the specified images’ root file system in a location which can be accessed from the mount namespace via the podman unshare command, and returns its location.

The podman image mount command without any arguments lists all of the currently mounted images.

Rootless mode supports mounting UFS driver too.

podman image mountLink leaves IBM Docs
Supported podman image prune   Remove all unused images from the local store.   podman image pruneLink leaves IBM Docs
Supported podman image pull podman pull Pull an image from a registry.   podman image pullLink leaves IBM Docs
Supported podman image push podman push Push an image from local storage to elsewhere.   podman image pushLink leaves IBM Docs
Supported podman image rm podman rmi Remove one or more locally stored images.   podman image removeLink leaves IBM Docs
Supported podman image save podman save Save an image to docker-archive or oci.   podman image saveLink leaves IBM Docs
Supported podman image search podman search Search a registry for an image.   podman image searchLink leaves IBM Docs
Supported podman image tag podman tag Add an additional name to a local image.   podman image tagLink leaves IBM Docs
Supported podman image tree   Print layer hierarchy of an image in a tree format.   podman image treeLink leaves IBM Docs
Supported podman image trust   Manage container registry image trust policy.   podman image trustLink leaves IBM Docs
Supported podman image unmount   Unmount an image’s root filesystem.   podman image unmountLink leaves IBM Docs
Supported podman image untag podman untag Remove one or more names from a locally-stored image.   podman image untagLink leaves IBM Docs
Supported podman kube apply   Apply Kubernetes YAML based on containers, pods, or volumes to a Kubernetes cluster.   podman kube applyLink leaves IBM Docs
Supported podman kube down   Remove containers and pods based on Kubernetes YAML.   podman kube downLink leaves IBM Docs
Supported podman kube generate   Generate Kubernetes YAML from containers, pods or volumes.   podman kube generateLink leaves IBM Docs
Supported podman kube play   Play a pod or volume based on Kubernetes YAML   podman kube playLink leaves IBM Docs
Supported podman login   Log in to a container registry.   podman loginLink leaves IBM Docs
Supported podman logout   Log out of a container registry.   podman logoutLink leaves IBM Docs
Supported podman manifest add   Add an image to a manifest list or image index.   podman manifest addLink leaves IBM Docs
Supported podman manifest annotate   Add or update information about an entry in a manifest list or image index.   podman manifest annotateLink leaves IBM Docs
Supported podman manifest create   Create a manifest list or image index.   podman manifest createLink leaves IBM Docs
Supported podman manifest exists   Check if the given manifest list exists in local storage.   podman manifest existsLink leaves IBM Docs
Supported podman manifest inspect   Display a manifest list or image index.   podman manifest inspectLink leaves IBM Docs
Supported podman manifest push   Push a manifest list or image index to a registry.   podman manifest pushLink leaves IBM Docs
Supported podman manifest remove   Remove an image from a manifest list or image index.   podman manifest removeLink leaves IBM Docs
Supported podman manifest rm   Remove manifest list or image index from local storage.   podman manifest rmLink leaves IBM Docs
Supported podman network exists   Check if the given network exists.   podman network existsLink leaves IBM Docs
Supported podman network inspect podman inspect Display the network configuration for one or more networks.   podman network inspectLink leaves IBM Docs
Supported podman network ls   Display a summary of networks.   podman network lsLink leaves IBM Docs
Supported podman pod clone   Create a copy of an existing pod.   podman pod cloneLink leaves IBM Docs
Supported podman pod create   Create a new pod.   podman pod createLink leaves IBM Docs
Supported podman pod exists   Check if a pod exists in local storage.   podman pod existsLink leaves IBM Docs
Supported podman pod inspect   Display information describing a pod.   podman pod inspectLink leaves IBM Docs
Supported podman pod kill   Kill the main process of each container in one or more pods.   podman pod killLink leaves IBM Docs
Supported podman pod logs   Display logs for pod with one or more containers.   podman pod logsLink leaves IBM Docs
Supported podman pod prune   Remove all stopped pods and their containers.   podman pod pruneLink leaves IBM Docs
Supported podman pod ps   Print out information about pods.   podman pod psLink leaves IBM Docs
Supported podman pod restart   Restart one or more pods.   podman pod restartLink leaves IBM Docs
Supported podman pod rm   Remove one or more stopped pods and containers.   podman pod rmLink leaves IBM Docs
Supported podman pod start   Start one or more pods.   podman pod startLink leaves IBM Docs
Supported podman pod stop   Stop one or more pods.   podman pod stopLink leaves IBM Docs
Supported podman secret create   Create a new secret.   podman secret createLink leaves IBM Docs
Supported podman secret exists   Check if a secret exists in local storage   podman secret existsLink leaves IBM Docs
Supported podman secret inspect   Check if the given secret exists.   podman secret inspectLink leaves IBM Docs
Supported podman secret ls   List all available secrets.   podman secret lsLink leaves IBM Docs
Supported podman secret rm   Remove one or more secrets.   podman secret rmLink leaves IBM Docs
Supported podman system df   Show Podman disk usage.   podman system dfLink leaves IBM Docs
Supported podman system info podman info Display Podman related system information.   podman system infoLink leaves IBM Docs
Supported podman system migrate   Migrate existing containers to a new Podman version. Podman uses a podman pause process to keep the mount namespaces alive. This prevents mounts from global mount namespace being propagated to the containers while the podman pause process is running.

For these changes to be propagated, it is necessary to first stop all running containers associated with the user and to stop the podman pause process, and delete the pid file.

Instead of doing this manually, podman system migrate can be used to stop both the running containers and the pause process which allows Podman to run in a new mount namespace to reflect the changes.

podman system migrateLink leaves IBM Docs
Supported podman system prune   Remove all unused pods, containers, images, networks, and volume data.   podman system pruneLink leaves IBM Docs
Supported podman system reset   Reset storage back to initial state.   podman system resetLink leaves IBM Docs
Supported podman system service   Run an API service.

podman system service creates a listening service that answers API calls for Podman. The REST API provided by podman system service is split into two parts: a compatibility layer offering support for the Docker v1.40 API, and a Podman-native Libpod layer. z/OS Container Platform currently supports a subset of the Podman-native Libpod service. See Supported REST APIs for Podman Libpod Library.

podman system service takes an optional endpoint argument for the API in URI form. For example, unix:///tmp/foobar.sock . If no endpoint is provided, default is used. The default endpoint for a rootful service is unix:///var/run/podman/podman.sock. The default endpoint for a rootless service is unix:///var/run/user/1000/podman/podman.sock. For z/OSCP, we currently support AF_UNIX type connection only. The socket file is owned/read/writable by the Podman user only.

--help, -h
Print usage statement.
--time, -t
The time until the session expires in seconds. The default is 5 seconds. A value of 0 means no timeout, therefore the session does not expire. The API will not be available on demand because the command will stay terminated after the inactivity timeout has passed.

For example, run an API with an inactivity timeout of 5 seconds without using socket activation.

podman system service --time 5

The default socket was used because no URI argument was provided.

podman system serviceLink leaves IBM Docs
Supported podman unshare   Run a command inside of a modified user namespace. Launches a process (by default, $SHELL) in a new mount namespace. podman unshare is useful for troubleshooting and for manually clearing storage and other data related to images and containers.

It is also useful to use the podman mount command. If an user wants to mount and work with a container, then they need to execute podman unshare to access the location where the specified containers' root file system is mounted.

podman unshareLink leaves IBM Docs
Supported podman volume create   Create a new volume.
--opt, -o
Unsupported options:
  • Unsupported uid
  • Unsupported gid

See Unsupported flag options

podman volume createLink leaves IBM Docs
Supported podman volume exists   Check if the given volume exists.   podman volume existsLink leaves IBM Docs
Supported podman volume export   Export volume to external tar.   podman volume exportLink leaves IBM Docs
Supported podman volume import   Import tarball contents into an existing Podman volume.   podman volume importLink leaves IBM Docs
Supported podman volume inspect podman inspect Get detailed information on one or more volumes.   podman volume inspectLink leaves IBM Docs
Supported podman volume ls   List all the available volumes.   podman volume lsLink leaves IBM Docs
Supported podman volume mount   Mount a volume filesystem. Mounts the specified volumes’ file system in a location which can be accessed from the mount namespace via the podman unshare command, and returns its location.

Rootless mode only supports mounting file volumes. All other volume types fail to mount.

podman volume mountLink leaves IBM Docs
Supported podman volume prune   Remove all unused volumes.   podman volume pruneLink leaves IBM Docs
Supported podman volume rm   Remove one or more volumes.   podman volume rmLink leaves IBM Docs
Supported podman volume unmount   Unmount a volume.   podman volume unmountLink leaves IBM Docs
Supported podman version   Display the Podman version information.   podman versionLink leaves IBM Docs

Unsupported Podman commands

Unsupported

Table 2. Podman commands that are unsupported for use with IBM z/OS Container Platform
Command Alias Function
Unsupported podman auto-update   Auto update containers according to their auto-update policy.
Unsupported podman container checkpoint   Checkpoint one or more running containers.
Unsupported podman container pause podman pause Pause one or more containers.
Unsupported podman container port podman port List port mappings for the container.
Unsupported podman container restore   Restore one or more containers from a checkpoint.
Unsupported podman container stats podman stats Display a live stream of one or more container’s resource usage statistics.
Unsupported podman container top podman top Display the running processes of a container.
Unsupported podman container unpause podman unpause Unpause one or more containers.
Unsupported podman container update podman update Update the cgroup configuration of a given container.
Unsupported podman farm build   Build images on farm nodes, then bundle them into a manifest list.
Unsupported podman farm create   Create a new farm.
Unsupported podman farm list podman farm ls List the existing farms.
Unsupported podman farm remove podman farm rm Delete one or more farms.
Unsupported podman farm update   Update an existing farm.
Unsupported podman generate systemd   Generate systemd unit file(s) for a container or pod.
Unsupported podman healthcheck run   Run a container health check.
Unsupported podman image scp   Securely copy an image from one host to another.
Unsupported podman image sign   Create a signature for an image.
Unsupported podman machine info   Display machine host info.
Unsupported podman machine init   Initialize a new virtual machine.
Unsupported podman machine inspect   Inspect one or more virtual machines.
Unsupported podman machine list   List virtual machines.
Unsupported podman machine rm   Remove a virtual machine.
Unsupported podman machine set   Set a virtual machine setting.
Unsupported podman machine ssh   SSH into a virtual machine.
Unsupported podman machine start   Start a virtual machine.
Unsupported podman machine stop   Stop a virtual machine.
Unsupported podman network connect   Connect a container to a network.
Unsupported podman network create   Create a Podman network.
Unsupported podman network disconnect   Disconnect a container from a network.
Unsupported podman network prune   Remove all unused networks.
Unsupported podman network reload   Reload network configuration for containers.
Unsupported podman network rm   Remove one or more networks.
Unsupported podman network update   Update an existing Podman network
Unsupported podman pod pause   Pause one or more pods.
Unsupported podman pod stats   Display a live stream of resource usage stats for containers in one or more pods.
Unsupported podman pod top   Display the running processes of containers in a pod.
Unsupported podman pod unpause   Unpause one or more pods.
Unsupported podman system connection add   Record destination for the Podman service.
Unsupported podman system connection default   Set named destination as default for the Podman service.
Unsupported podman system connection list   List the destination for the Podman service(s).
Unsupported podman system connection remove   Delete named destination.
Unsupported podman system connection rename   Rename the destination for Podman service.
Unsupported podman system renumber   Migrate lock numbers to handle a change in maximum number of locks.
Unsupported podman volume reload   Reload all volumes from volumes plug-ins.

Unsupported flag options

Unsupported

The following options are not supported with zOSCP.

The following options related to cgroup and capabilities are not supported:

Table 3. Unsupported flag options
Unsupported cgroup and capability related options
--blkio-weight
--blkio-weight-device
--cap-add
--cap-drop
--cgroupns
--cgroups
--cgroup-conf
--cgroup-manager
--cgroup-parent
--cpu-period
--cpu-quota
--cpu-rt-period
--cpu-rt-runtime
--cpus
--cpuset-cpus
--cpuset-mems
--cpu-shares
--device-cgroup-rule
--device-read-bps
--device-read-iops
--device-write-iops
--device-write-bps
--memory
--memory-swap
--memory-reservation
--memory-swappiness

The following network-related options are not supported:

Table 4. Unsupported network-related options
Unsupported network related options
--expose
--ip
--ip6
--mac-address
--network
--network-alias
--network-cmd-path
--publish
--publish-all

The following health-related options are not supported:

Table 5. Unsupported health-related options
Unsupported health-related options
--health-cmd
--health-interval
--health-retries
--health-start-period
--health-timeout
--health-on-failure
--no-healthcheck

The following Linux®-specific options are not supported:

Table 6. Unsupported Linux-specific options
Unsupported Linux-specific options
--cgroup-conf
--disable-content-trust
--device
--init
--init-path
--kernel-memory
--oom-kill-disable
--oom-score-adj
--pause
--personality
--pids-limit
--privileged
--rdt-class
--rootless-netns
--sdnotify
--seccomp-policy
--security-opt
--service-container
--shm-size
--shm-size-systemd
--sysctl
--systemd
--tz
--wait

The following cross-platform options are not supported:

Table 7. Unsupported cross-platform options
Unsupported cross-platform options
--arch
--os
--platform
--variant

The following user-related options are not supported:

The following remote-related options are not supported:

Supported REST APIs for Podman Libpod Library

The following list of REST APIs are supported by zOSCP for use with the podman system service command:

Table 10. Supported REST APIs for Podman Libpod Library
REST API Podman documentation
Supported DEL Delete a container DEL Delete a containerLink leaves IBM Docs
Supported GET Get container logs GET Get container logsLink leaves IBM Docs
Supported GET Get container info GET Get infoLink leaves IBM Docs
Supported GET Inspect container GET Inspect containerLink leaves IBM Docs
Supported GET Inspect an exec instance GET Inspect an exec instanceLink leaves IBM Docs
Supported GET Inspect an image GET Inspect an imageLink leaves IBM Docs
Supported GET Ping service GET Ping serviceLink leaves IBM Docs
Supported List containers LIST containersLink leaves IBM Docs
Supported List images LIST imagesLink leaves IBM Docs
Supported POST Create a container POST Create a containerLink leaves IBM Docs
Supported POST Create an exec instance POST Create an exec instanceLink leaves IBM Docs
Supported POST Kill container POST Kill containerLink leaves IBM Docs
Supported POST Load image POST Load imageLink leaves IBM Docs
Supported POST Pull images POST Pull imagesLink leaves IBM Docs
Supported POST Start a container POST Start a containerLink leaves IBM Docs
Supported POST Start an exec instance POST Start an exec instanceLink leaves IBM Docs
Supported POST Stop a container POST Stop a containerLink leaves IBM Docs
Supported POST Resize an exec instance POST Resize an exec instanceLink leaves IBM Docs
Supported POST Wait on a container POST Wait on a containerLink leaves IBM Docs
Note:

Many other APIs listed in the Podman community documentation Link leaves IBM Docs are not currently supported by zOSCP.