irods / irods_testing_environment

BSD 3-Clause "New" or "Revised" License
8 stars 15 forks source link

Running the test environment with podman #180

Closed fiberbit closed 11 months ago

fiberbit commented 11 months ago

While trying to run the test environment with podman instead of docker I ran into some small issues.

Whether they are strictly caused by differences between "podman" and "docker" I don't know. The patches might be small improvements anyway.

I tested on Fedora 39. OS packages installed were "podman", "podman-compose" and "podman-docker". I created a symbolic link "docker-compose" in the PATH to "podman-compose".

The virtual environment was set-up with python3.6 (the default on Fedora 39 is python3.12) as this makes installing the venv run without errors. No specific changes were necessary.

I used the "rootless" set-up for podman.

# Source: https://unix.stackexchange.com/questions/731645/podman-w-docker-compose-run-as-user

# Disable system wide settings
$ systemctl disable --now podman podman.socket

# Enable user wide settings
$ systemctl enable --now --user podman podman.socket
$ systemctl --user start podman podman.socket

# Make `docker` use it:
$ Check what path is used for the unix socket:
$ podman info --format '{{.Host.RemoteSocket.Path}}'

$ export DOCKER_HOST=unix:///run/user/1000/podman/podman.sock

# Debug ouput:
$ podman --log-level=debug system service -t0
# Check connectivity:
$ curl --unix-socket /run/user/1000/podman/podman.sock -X GET http://d/version`[d]`

Using the xunit-viewer container also works, if you remember to use the ":Z" flag (SELinux is used on RHEL like systems) for the /results bind-mount.