Feat: lab0 done
This commit is contained in:
31
Dockerfile
Normal file
31
Dockerfile
Normal file
@@ -0,0 +1,31 @@
|
||||
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 []
|
||||
Reference in New Issue
Block a user