-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
27 lines (23 loc) · 1.02 KB
/
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
FROM centos/nginx-116-centos7:1.16
ENV LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
LC_ALL=en_US.UTF-8
USER root
RUN \
echo "Asia/shanghai" > /etc/timezone && \
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
rm -f /etc/yum.repos.d/* && \
echo "ip_resolve=4" >> /etc/yum.conf && \
sed -e 's!enabled=1!enabled=0!g' -i /etc/yum/pluginconf.d/fastestmirror.conf && \
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo && \
curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo && \
curl --silent --location https://rpm.nodesource.com/setup_10.x | bash - && \
sed -e 's!gpgkey=http://mirrors.aliyun.com/centos!gpgkey=file:///etc/pki/rpm-gpg!g' \
-e '/aliyuncs/d' \
-i /etc/yum.repos.d/CentOS-Base.repo \
-i /etc/yum.repos.d/epel.repo && \
yum -y install net-tools iproute bind-utils telnet wget less jq && \
rm -rf /var/cache/yum && \
rm -f /root/*
WORKDIR /root
CMD ["nginx", "-g", "daemon off;"]