Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full on systemd container for testing #79

Merged
merged 3 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ custom:
versions:
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-22.04-systemd
- ubuntu-24.04
- rockylinux-8
- rockylinux-9
Expand Down
29 changes: 29 additions & 0 deletions custom/testing/rescue.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
#
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.

[Unit]
Description=Rescue Shell
Documentation=man:sulogin(8)
DefaultDependencies=no
Conflicts=shutdown.target
After=sysinit.target plymouth-start.service
Before=shutdown.target

[Service]
Environment=HOME=/root
WorkingDirectory=-/root
ExecStart=
ExecStart=-/bin/bash
Type=idle
StandardInput=tty-force
StandardOutput=inherit
StandardError=inherit
KillMode=process
IgnoreSIGPIPE=no
SendSIGHUP=yes
19 changes: 19 additions & 0 deletions custom/testing/ubuntu-22.04-systemd.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM ubuntu:22.04

COPY 01_nodoc /etc/dpkg/dpkg.cfg.d/01_nodoc

RUN apt update -y \
&& echo 'tzdata tzdata/Areas select America' | debconf-set-selections \
&& echo 'tzdata tzdata/Zones/America select Phoenix' | debconf-set-selections \
&& DEBIAN_FRONTEND="noninteractive" apt install -y \
tar wget xz-utils vim-nox apt-utils init systemd


RUN ./salt/salt --versions-report > /versions.txt

# Set the root password, this was done before single user mode worked.
# RUN echo "root\nroot" | passwd -q root
RUN echo "systemd.debug_shell=tty1" >> /etc/sysctl.conf
COPY rescue.service /etc/systemd/system/rescue.service.d/override.conf

CMD [ "/sbin/init", "1" ]
Loading