From 550d0927eed84d782e2d8fcce6b88d4e1c8a80f7 Mon Sep 17 00:00:00 2001 From: Ruslan Safin Date: Fri, 12 Jan 2024 16:18:30 +0300 Subject: [PATCH 1/2] removed dependency from 3rd party image --- Dockerfile | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6d94c7a..87feafd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,29 @@ -FROM jrei/systemd-debian:12 -RUN apt update && apt install -y sudo wget procps curl systemd iproute2 && rm -rf /var/lib/apt/lists/* +FROM debian:bookworm + +ENV container docker +ENV LC_ALL C +ENV DEBIAN_FRONTEND noninteractive + +RUN apt-get update \ + && apt-get install -y systemd systemd-sysv sudo wget procps curl systemd iproute2 \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + +RUN cd /lib/systemd/system/sysinit.target.wants/ \ + && rm $(ls | grep -v systemd-tmpfiles-setup) + +RUN rm -f /lib/systemd/system/multi-user.target.wants/* \ + /etc/systemd/system/*.wants/* \ + /lib/systemd/system/local-fs.target.wants/* \ + /lib/systemd/system/sockets.target.wants/*udev* \ + /lib/systemd/system/sockets.target.wants/*initctl* \ + /lib/systemd/system/basic.target.wants/* \ + /lib/systemd/system/anaconda.target.wants/* \ + /lib/systemd/system/plymouth* \ + /lib/systemd/system/systemd-update-utmp* + +VOLUME [ "/sys/fs/cgroup" ] + RUN curl -sL https://install.raspap.com | bash -s -- --yes --wireguard 1 --openvpn 1 --adblock 1 COPY firewall-rules.sh /home/firewall-rules.sh RUN chmod +x /home/firewall-rules.sh From e3c322899c3c2e3695ded314db44e71abdd0b550 Mon Sep 17 00:00:00 2001 From: ruslan-safin <77247173+ruslan-safin@users.noreply.github.com> Date: Wed, 17 Jan 2024 18:08:53 +0300 Subject: [PATCH 2/2] Update Dockerfile --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 51e7a53..6873c9c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,5 @@ +# Some parts of code originated from https://github.com/j8r/dockerfiles/ + FROM debian:bookworm ENV container docker @@ -27,4 +29,4 @@ VOLUME [ "/sys/fs/cgroup" ] RUN curl -sL https://install.raspap.com | bash -s -- --yes --wireguard 1 --openvpn 1 --adblock 1 COPY firewall-rules.sh /home/firewall-rules.sh RUN chmod +x /home/firewall-rules.sh -CMD [ "/bin/bash", "-c", "/home/firewall-rules.sh && /lib/systemd/systemd" ] \ No newline at end of file +CMD [ "/bin/bash", "-c", "/home/firewall-rules.sh && /lib/systemd/systemd" ]