Skip to content

Podman Installation

Environment

Red Hat Enterprise Linux 9 (RHEL)

Prerequisites

  • Podman
    $ sudo yum install -y podman-4.2.0-11.el9_1.x86_64
    $ sudo yum install -y podman-remote-4.2.0-11.el9_1.x86_64
    $ sudo yum install -y podman-plugins
    

Note

dnsname plugin tool included in Podman-plugins allows containers to resolve each other by name.

  • Docker Compose We choose Docker Compose as a container orchestration tool to control and deploy microservices.
$ sudo curl -SL https://github.com/docker/compose/releases/download/v2.18.1/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
$ sudo chmod +x /usr/local/bin/docker-compose

Note

You have to install the specific version of Docker Compose to prevent Docker-compose pull issue.

  • Activate the Podman API socket and podman API service.
$ systemctl --user enable --now podman.socket
  • Update the configuration file /etc/containers/registries.conf to use docker.io only.
unqualified-search-registries = ["docker.io"]
  • Login to Docker hub
$ podman login --authfile ~/.docker/config.json docker.io

Note

Edge Xpert images are stored in the docker hub so you have to log in to the Docker registry and gain access to the image.

  • When running rootless Podman, users should make sure to add user information before proceeding to the next step of the installation. Run the following command to check the UID and GID for the user.
$ grep <current_username> /etc/subuid /etc/subgid
/etc/subuid:<current_username>:100000:65536
/etc/subgid:<current_username>:100000:65536

Note

If you do not get any output, see Podman rootless_tutorial to enable the user namespaces.

Caution

Since Podman is a rootless environment by default, su or sudo permission are not allowed on Podman. Also, Edge Xpert services deployment is based on Podman, so it does not work with Podman as a root user; if you are running edgexpert command as a root user, it will return error message as below.

$ sudo edgexpert license install <your Edge Xpert license>
ERROR: Error: unrecognized command `podman-remote compose`
Try 'podman-remote --help' for more information
podman-remote: exit status 125