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 +63
-0
lines changed
dockerfiles/ubuntu-disco-systemd-docker Expand file tree Collapse file tree 1 file changed +63
-0
lines changed Original file line number Diff line number Diff line change
1
+ #
2
+ # Ubuntu Disco + Systemd + Sshd + Docker
3
+ #
4
+ # Usage:
5
+ #
6
+ # $ docker run --runtime=sysbox-runc -it --rm -P --name=syscont nestybox/ubuntu-disco-systemd-docker
7
+ #
8
+ # This will run systemd and prompt for a user login; the default
9
+ # user/password in this image is "admin/admin". Once you log in you
10
+ # can run Docker inside as usual. You can also ssh into the image:
11
+ #
12
+ # $ ssh admin@<host-ip> -p <host-port>
13
+ #
14
+ # where <host-port> is chosen by Docker and mapped into the system container's sshd port.
15
+ #
16
+
17
+ FROM nestybox/ubuntu-disco-systemd:latest
18
+
19
+ # Docker install
20
+ RUN apt-get update && apt-get install --no-install-recommends -y \
21
+ apt-transport-https \
22
+ ca-certificates \
23
+ curl \
24
+ gnupg-agent \
25
+ software-properties-common && \
26
+ \
27
+ curl -fsSL https://download.docker.com/linux/ubuntu/gpg \
28
+ | apt-key add - && \
29
+ \
30
+ apt-key fingerprint 0EBFCD88 && \
31
+ \
32
+ add-apt-repository \
33
+ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
34
+ $(lsb_release -cs) \
35
+ stable" && \
36
+ \
37
+ apt-get update && apt-get install --no-install-recommends -y \
38
+ docker-ce docker-ce-cli containerd.io && \
39
+ \
40
+ # Housekeeping
41
+ apt-get clean -y && \
42
+ rm -rf \
43
+ /var/cache/debconf/* \
44
+ /var/lib/apt/lists/* \
45
+ /var/log/* \
46
+ /tmp/* \
47
+ /var/tmp/* \
48
+ /usr/share/doc/* \
49
+ /usr/share/man/* \
50
+ /usr/share/local/* && \
51
+ \
52
+ # Add user "admin" to the Docker group
53
+ usermod -a -G docker admin
54
+
55
+ # Sshd install
56
+ RUN apt-get update && apt-get install --no-install-recommends -y \
57
+ openssh-server && \
58
+ mkdir /home/admin/.ssh
59
+
60
+ EXPOSE 22
61
+
62
+ # Set systemd as entrypoint.
63
+ ENTRYPOINT [ "/sbin/init" ]
You can’t perform that action at this time.
0 commit comments