Run Sandfly with Podman
Some Linux distributions (aka distros), such as Red Hat Enterprise Linux (RHEL) and its related distros, officially support Podman rather than Docker. Sandfly is able to use the Docker images with Podman on those distros by performing the following steps, which have been tested on RHEL 8.7 and 9.0.
Podman is not supported with the Compose-based installation method; use only the Docker Image installation process.
IMPORTANT: Server and Node Installation Documentation Supplemental ProcessThis is a supplemental process for the Server and Node - Docker Image installation documentation. Do not complete these steps unless directed by our installation processes.
Podman Preparation
Required Packages
Install Podman and other required, supporting packages.
If you are planning to use rootless mode, install the following packages:
sudo dnf install podman podman-plugins dnsmasq slirp4netnsIf you are planning to use rootful mode, install the following packages:
sudo dnf install podman podman-plugins dnsmasqDepending on the version of Podman being used, some packages may no longer be available or required. If you encounter any "no match" errors, remove that package from the install list and run again if necessary.
INFO: Podman plugins adds support for DNS-based name resolutionThe podman-plugins and dnsmasq packages provide the podman dnsname plugin to allow DNS-based name resolution between containers in a Podman network, which Sandfly depends on. The podman-plugins may no longer be supported in certain versions of podman, so remove it from the install list if no match is found.
The slirp4netns package is used for rootless network support.
Podman Modes
Sandfly supports using Podman in either the rootful or rootless user mode. When executing the Sandfly installation and start scripts during the normal Docker Image installation process:
- To run Podman as rootful, run those scripts via
sudoor as the root user. - To run Podman as rootless, run those scripts as a normal user.
Note, however, that running the Docker Image installation script as a normal user will prompt for the sudo password in order to perform some of the actions required to allow the Sandfly Server to run.
Mode Actions (Informational)
This section provides details on what actions are taken by the Sandfly installation and start scripts to set up and run Podman. No additional actions are needed on your part; this information is only provided for your awareness.
Rootful User Mode Actions
- The start scripts will create container files in the
/etc/containers/systemdfolder to allowsystemdto start the containers at boot time.
Rootless User Mode Actions
- Modify
sysctl.confto allow an unprivileged process to bind to ports 80 and 443 ( NOTE: requires root access viasudo). - Enable
Lingermode for the current user to prevent containers from shutting down at logout and to start the containers at boot time. - Create container files in the
~/.config/containers/systemdfolder to allowsystemdto start the containers at boot time. - If Podman is version 5 or later and the default Rootless Network Cmd is configured to use
pasta, the installation script will create or modify the~/.config/containers/containers.conffile to useslirp4netnsas thedefault_rootless_network_cmd.
Continue Installing Sandfly
If you attempted to install Sandfly on a Podman system before the dnsname plugin was installed, the sandfly-net network must be deleted before attempting the installation again (it will be automatically re-created by the Sandfly scripts):
sudo podman network rm sandfly-netAt this point return to the referencing process and proceed with the remaining Sandfly installation and startup steps while keeping in mind which option to use for the Podman user mode.
Updated 16 days ago