projectatomic / oci-systemd-hook

OCI hook to enable running systemd in a container
GNU General Public License v3.0
64 stars 26 forks source link

oci-systemd-hook run different names, or force it on a a container #96

Open mwoodson opened 6 years ago

mwoodson commented 6 years ago

This is a question or possible issue. My best guess is this is not getting the oci-systemd-hook setup.

I am trying to run the docker.io/gitlab/gitlab-ce on CentOS 7.5 with podman. I am attempting to migrate from docker. In docker this ran without issues.

The gitlab is a ubuntu 16.0.4 based image that has the CMD of "/assets/wrapper". This wrapper script runs some chef commands to do pre-setup then calls the "init" command. The init command fails with:

Running handlers:
There was an error running gitlab-ctl reconfigure:

execute[init q] (runit::sysvinit line 28) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of init q ----
STDOUT: 
STDERR: Couldn't find an alternative telinit implementation to spawn.
---- End output of init q ----
Ran init q returned 1

So init is not starting up. My question is there a way to force the oci-systemd-hook even if the CMD is not "init"?

rhatdan commented 6 years ago

Not without a recompile, without the ARGS_CHECK flag.

But all that the hook cares about is the cmd is init or systemd. So if you put your startup script in a different directory like /usr/bin/myinit/init, systemdhook will fire.