-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (15 loc) · 849 Bytes
/
Dockerfile
File metadata and controls
23 lines (15 loc) · 849 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM centos:7.9.2009
ENV HOSTNAME=manager
RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* && \
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
RUN yum install -y dbus dbus-x11 openssh-server python3 && yum clean all
RUN rm -f /etc/machine-id /var/lib/dbus/machine-id && \
dbus-uuidgen --ensure=/etc/machine-id && \
ln -sf /etc/machine-id /var/lib/dbus/machine-id
RUN ssh-keygen -A
RUN echo 'root:rootpwd' | chpasswd
COPY third-party/docker-systemctl-replacement/systemctl3.py /usr/local/bin/systemctl
COPY third-party/docker-systemctl-replacement/journalctl3.py /usr/local/bin/journalctl
RUN chmod +x /usr/local/bin/systemctl /usr/local/bin/journalctl
RUN /usr/local/bin/systemctl enable sshd
CMD ["/usr/bin/python3", "/usr/local/bin/systemctl", "init"]