-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathubuntu-20.04.Dockerfile
38 lines (30 loc) · 1.08 KB
/
ubuntu-20.04.Dockerfile
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
38
FROM ubuntu:20.04
LABEL maintainer="Dennis Hoppe"
ENV container=docker
ARG DEBIAN_FRONTEND=noninteractive
RUN sed -i 's/# deb/deb/g' /etc/apt/sources.list
RUN apt update ; \
apt upgrade -y ; \
apt install -y \
iproute2 \
lsb-release \
python3-apt \
python3-dev \
sudo \
systemd \
systemd-sysv ; \
apt clean ; \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN cd /lib/systemd/system/sysinit.target.wants/ ; \
ls | grep -v systemd-tmpfiles-setup | xargs rm -f $1 ; \
rm -f /lib/systemd/system/multi-user.target.wants/* ; \
rm -f /etc/systemd/system/*.wants/* ; \
rm -f /lib/systemd/system/local-fs.target.wants/* ; \
rm -f /lib/systemd/system/sockets.target.wants/*udev* ; \
rm -f /lib/systemd/system/sockets.target.wants/*initctl* ; \
rm -f /lib/systemd/system/basic.target.wants/* ; \
rm -f /lib/systemd/system/anaconda.target.wants/* ; \
rm -f /lib/systemd/system/plymouth* ; \
rm -f /lib/systemd/system/systemd-update-utmp*
VOLUME ["/sys/fs/cgroup"]
CMD ["/lib/systemd/systemd"]