diff --git a/Dockerfile b/Dockerfile index 4c31a4f..6873c9c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,32 @@ -FROM jrei/systemd-debian:12 -RUN apt update && apt install -y sudo wget procps curl systemd iproute2 && rm -rf /var/lib/apt/lists/* +# Some parts of code originated from https://github.com/j8r/dockerfiles/ + +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 -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" ]