This repository was archived by the owner on Aug 7, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +59
-0
lines changed
dockerfiles/ubuntu-bionic-systemd Expand file tree Collapse file tree 1 file changed +59
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Nestybox's systemd dockerfile.
2
+ #
3
+ # Description:
4
+ #
5
+ # Image's goal is to serve as a basic building-block for users looking to
6
+ # run various background processes (daemons) in Nestybox's system containers.
7
+ # For this purpose we are installing systemd process-manager as part of this
8
+ # Dockerfile.
9
+ #
10
+ #
11
+ # Container initialization:
12
+ #
13
+ # $ docker run --runtime=sysbox-runc \
14
+ # -it --rm --name=sys-cont nestybox/ubuntu-bionic-systemd
15
+ #
16
+
17
+ FROM ubuntu:bionic
18
+
19
+ #
20
+ # Systemd installation
21
+ #
22
+ RUN apt-get update && \
23
+ apt-get install -y --no-install-recommends \
24
+ systemd \
25
+ systemd-sysv \
26
+ libsystemd0 \
27
+ ca-certificates \
28
+ dbus \
29
+ iptables \
30
+ iproute2 \
31
+ kmod \
32
+ locales \
33
+ sudo \
34
+ udev && \
35
+ \
36
+ # Prevents journald from reading kernel messages from /dev/kmsg
37
+ echo "ReadKMsg=no" >> /etc/systemd/journald.conf && \
38
+ \
39
+ # Housekeeping
40
+ apt-get clean -y && \
41
+ rm -rf \
42
+ /var/cache/debconf/* \
43
+ /var/lib/apt/lists/* \
44
+ /var/log/* \
45
+ /tmp/* \
46
+ /var/tmp/* \
47
+ /usr/share/doc/* \
48
+ /usr/share/man/* \
49
+ /usr/share/local/* && \
50
+ \
51
+ # Create default 'admin/admin' user
52
+ useradd --create-home --shell /bin/bash admin && echo "admin:admin" | chpasswd && adduser admin sudo
53
+
54
+
55
+ # Make use of stopsignal (instead of sigterm) to stop systemd containers.
56
+ STOPSIGNAL SIGRTMIN+3
57
+
58
+ # Set systemd as entrypoint.
59
+ ENTRYPOINT [ "/sbin/init" ]
You can’t perform that action at this time.
0 commit comments