Add dockerfiles

master
Kirigaya Kazuto 2022-02-05 23:40:54 +00:00
parent 6d10dd0d55
commit bf8efa8b8e
3 changed files with 29 additions and 0 deletions

4
DockerfileBuildEnv Normal file
View File

@ -0,0 +1,4 @@
FROM ubuntu:latest
RUN apt update \
&& apt install -y build-essential \
&& rm -rf /var/lib/apt/lists/*

3
DockerfileCN Normal file
View File

@ -0,0 +1,3 @@
FROM ubuntu:latest
RUN sed -i 's/archive.ubuntu.com/mirrors.cloud.tencent.com/g; s/security.ubuntu.com/mirrors.cloud.tencent.com/g' /etc/apt/sources.list \
&& rm -f /etc/apt/apt.conf.d/docker-gzip-indexes

22
DockerfileRunEnv Normal file
View File

@ -0,0 +1,22 @@
FROM ubuntu:latest
RUN rm -f /etc/apt/apt.conf.d/docker-gzip-indexes \
&& apt update \
&& TZ=Asia/Shanghai DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt install -y systemd systemd-sysv \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/* /var/tmp/* \
&& sed 's/ProtectHostname=yes/ProtectHostname=no/g' -i /lib/systemd/system/systemd-logind.service \
&& 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/* \
/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*
RUN apt update \
&& apt install -y python3 nginx iputils-ping iproute2 curl \
&& rm -rf /var/lib/apt/lists/*
ENTRYPOINT ["/bin/systemd"]