Unable to setup ea-podman on CloudLinux+CageFS servers Print

  • 0

Symptoms

Attempting to install an ea-podman container for an account returns the following error.

/usr/local/cpanel/scripts/ea-podman install ea-redis62
Can't exec "podman": No such file or directory at /opt/cpanel/ea-podman/lib/ea_podman/util.pm line 90.
Failed to create container

It's also possible to receive additional errors.

/usr/local/cpanel/scripts/ea-podman install ea-redis62
Cannot open “/etc/cpanel/ea4/ea4-metainfo.json”: No such file or directory at /usr/local/cpanel/Cpanel/JSON.pm line 272.

 

Description

On cPanel servers, containers via ea-podman can be used to install a few software packages independently and separately from the rest of the server. These applications will also run as the user account.

  • Redis
  • Memcached
  • Tomcat

The podman software doesn't usually run from inside a jail like CageFS and will return errors. To run podman containers inside of CageFS, you must configure a few additional settings and files on the server.

 

Workaround

Note: The server administrator is needed to perform these steps.

  1. Create the systemctl wrapper file at path "/usr/local/bin/systemctl".

    #!/usr/bin/env bash
    export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus 
    exec /usr/bin/systemctl "$@"
  2. Make the wrapper executable.

    chmod a+x /usr/local/bin/systemctl
  3. Create the proxyexec commands config file for podman and the wrapper at path "/etc/cagefs/ea-podman.proxy.commands".

    PODMAN=/usr/bin/podman
    SYSTEMCTL=/usr/local/bin/systemctl
  4. Create the ea-podman CageFS configuration file at path "/etc/cagefs/conf.d/ea-podman.cfg".

    [ea-podman] 
    paths=/usr/bin/podman, /usr/local/bin/systemctl, /etc/cpanel/ea4/ea4-metainfo.json
  5. Update the CageFS for the config changes to be applied to the current CageFS mounts.

    cagefsctl --force-update
  6. Enable loginctl linger on the account to ensure the container remains persistent for users who log out.

    loginctl enable-linger <username>
  7. At this point, you can log in to SSH as the user account and install a container, such as "ea-redis".

    su - <username>
    /usr/local/cpanel/scripts/ea-podman install ea-redis62

You can find additional information on this topic in the CloudLinux knowledge base.

 ea-podman in CageFS


Was this answer helpful?
Back