Files
hpc-lab0/Dockerfile
2026-03-10 09:05:08 +08:00

32 lines
792 B
Docker

FROM docker.io/library/ubuntu:24.04
ENV container=docker \
DEBIAN_FRONTEND=noninteractive
COPY ./root /
RUN apt-get update && \
apt-get install -y --no-install-recommends \
sudo systemd findutils \
iproute2 iputils-ping wireguard wireguard-tools \
openssh-server #&& \
# apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# as the spec says
RUN find /etc/systemd/system /lib/systemd/system \
-path '*.wants/*' \
-not -name '*journald*' \
-not -name '*systemd-tmpfiles*' \
-not -name '*systemd-user-sessions*' \
-print0 | xargs -0 rm -vf
RUN systemctl enable \
wg-quick@wg0.service \
ssh.socket
RUN useradd -m judge -s /bin/bash
VOLUME ["/sys/fs/cgroup"]
ENTRYPOINT ["/lib/systemd/systemd"]
CMD []