GitLab container image fails to start when running inside Podman

Summary

GitLab container image fails to start when running inside Podman, an alternative, runc based (like Docker) container runtime.

Steps to reproduce

Install Podman, pull and create the container image with the command podman instead of docker

What is the current bug behavior?

GitLab fails to start with the error message:

Couldn't find an alternative telinit implementation to spawn.

What is the expected correct behavior?

GitLab should run exactly like when it runs on Docker, Podman uses the same container runtime (runc)

Notes

This problem was fixed previously when running on Docker by !838 (merged). That fix, detects that the image is being run inside Docker by checking the presence of the file /.dockerenv. Podman, not being Docker but runs the same container engine, adds another platform agnostic file name /run/.containerenv.

This is currently the only fix required to run GitLab on Podman instead of Docker, tested on a single server CE installation.

References

I have the proposed patch here robmv/omnibus-gitlab@e02435d0, if wanted for a merge request.

A workaround without the patch is to add a new volume like:

--volume /srv/gitlab/dockerenv:/.dockerenv

where /srv/gitlab/dockerenv can be any empty file.

Details of package version

  • GitLab container image for 10.8.4
  • Podman podman-0.4.1-4.gitb51d327.el7.x86_64 from CentOS 7