dnf install podman
podman pull quay.io/rockylinux/rockylinux
podman images
FROM rockylinux:9
RUN dnf install -y chrony
EXPOSE 123/udp
The -it option tells Podman to allocate a pseudo-TTY and keep STDIN open, so you can interact with the container.
podman create --name rocky -it rockylinux:9
podman ps -a
podman start rocky
podman exec -it rocky bash
podman stop rocky
podman rm rocky
- hosts: cwo02
tasks:
- name: Pull rocky image from hub
containers.podman.podman_image:
name: rockylinux:9-minimal
- name: Deply a chrony container
containers.podman.podman_container:
name: chrony
image: rockylinux:9-minimal
state: started
detach: true
exposed_ports:
- 123/udp
ports:
- 123:123/udp
- name: Pull an image
containers.podman.podman_image:
name: quay.io/bitnami/wildfly