feat: enable cockpit-ws to run after reboot into this image

This commit is contained in:
Benjamin Sherman
2023-03-08 18:42:57 -06:00
parent 39426dea46
commit 0129efca7c
3 changed files with 18 additions and 0 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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