diff --git a/Containerfile b/Containerfile index 44abf04..6cd5c7b 100644 --- a/Containerfile +++ b/Containerfile @@ -35,6 +35,7 @@ RUN cd /etc/yum.repos.d/ \ RUN sed -i 's/#AutomaticUpdatePolicy.*/AutomaticUpdatePolicy=stage/' /etc/rpm-ostreed.conf && \ sed -i 's/#DefaultTimeoutStopSec.*/DefaultTimeoutStopSec=60s/' /etc/systemd/user.conf && \ sed -i 's/#DefaultTimeoutStopSec.*/DefaultTimeoutStopSec=60s/' /etc/systemd/system.conf && \ + systemctl enable cockpit.service && \ systemctl enable rpm-ostreed-automatic.timer && \ rpm-ostree cleanup -m && \ ostree container commit diff --git a/README.md b/README.md index 5035d89..2600b96 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,10 @@ ificantly less disk space than [ucore-hci](https://github.com/bsherman/ucore-hci One can also layer packages directly on a machine running this or use this image as a base for a further customized OCI. +Note: cockpit-ws runs as a podman container, not a direct systemd service. This image pre-configures it to run, but it can be disabled: + + sudo systemctl disable --now cockpit.service + ## Usage diff --git a/etc/systemd/system/cockpit.service b/etc/systemd/system/cockpit.service new file mode 100644 index 0000000..9cacd91 --- /dev/null +++ b/etc/systemd/system/cockpit.service @@ -0,0 +1,13 @@ +[Unit] +Description=quay.io/cockpit/ws:latest podman container + +[Service] +Type=oneshot +ExecStartPre=-/usr/bin/podman rm -f cockpit-ws +ExecStart=/usr/bin/podman container runlabel --name cockpit-ws RUN quay.io/cockpit/ws:latest +ExecStop=/usr/bin/podman rm -f cockpit-ws +RemainAfterExit=yes +KillMode=none + +[Install] +WantedBy=multi-user.target \ No newline at end of file