Skip to content
Discussion options

You must be logged in to vote

I've dealt with this exact issue running TestContainers in OpenShift CI pipelines. The core problem is that OpenShift runs containers as non-root with a random UID, which conflicts with how Docker/Podman expects to operate.

Solutions (pick one)

Option 1: Use Podman as the container runtime (Recommended for OpenShift)

TestContainers 2.x supports Podman natively. In your OpenShift pipeline:

# testcontainers.properties or environment variables
docker.host=unix:///run/podman/podman.sock
testcontainers.ryuk.disabled=true
ryuk.container.privileged=false

And in your GitLab CI config, use a Podman-enabled image:

image: quay.io/podman/stable
script:
  - podman system service -t 0 unix:///run/podma…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by quentingosset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants