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

Install instructions #88

Open drewwells opened 6 years ago

drewwells commented 6 years ago

I see mentions that some small changes are required in Docker to use this library, from a Redhat blog post mentioning this project. There's no mentions of how to integrate these in a Docker host. Are there special steps? Running this example on Ubuntu results in an error:

FROM fedora:latest
ENV container docker
RUN yum -y update && yum -y install httpd && yum clean all
RUN systemctl mask dnf-makecache.timer && systemctl enable httpd
CMD [ "/sbin/init" ]
-> % docker run -ti --stop-signal=RTMIN+3 httpd
Failed to mount tmpfs at /run: Operation not permitted
[!!!!!!] Failed to mount API filesystems, freezing.
Freezing execution.
drewwells commented 6 years ago

Based on this, it appears only projectatomic/docker can use these hooks. https://pagure.io/atomic-wg/issue/233

rhatdan commented 6 years ago

Correct Upstream Docker did not accept patches to automatically run oci hooks.

rhatdan commented 6 years ago

We should be able to get this to work with CRI-O and eventually Podman.