-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-Debian
37 lines (26 loc) · 1.07 KB
/
Dockerfile-Debian
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
FROM debian:bookworm-slim
LABEL maintaner="André Lüneburger <[email protected]>"
LABEL description="Corosync Qdevice Network daemon"
LABEL documentation="man:corosync-qnetd"
LABEL version="1.1"
LABEL website="https://github.com/Sysadminfromhell/corosyncdevice"
RUN apt-get update \
&& apt-get upgrade -qy \
&& apt-get install --no-install-recommends -y supervisor openssh-server corosync-qnetd \
&& apt-get -y autoremove \
&& apt-get clean all \
&& rm -rf /var/lib/apt/* /var/lib/dpkg/* /var/lib/cache/* /var/lib/log/* /var/log/*
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
ENV container=docker
ENV passwd=Passw0rd!
COPY Secretpassword /root/Secretpassword
RUN sed -i 's/root:Passw0rd!/root:'$passwd'/' /root/Secretpassword
RUN cat /root/Secretpassword | chpasswd
RUN rm -rf /root/Secretpassword
COPY supervisord.conf /etc/supervisord.conf
HEALTHCHECK CMD corosync-qnetd-tool -s
VOLUME [ "/run/sshd", "/etc/corosync", "/etc/ssh" ]
EXPOSE 22/tcp
EXPOSE 5403/tcp
STOPSIGNAL SIGTERM
CMD ["/usr/bin/supervisord"]