This repository has been archived by the owner on Jan 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from TimeBye/master
[IMP]update base image
- Loading branch information
Showing
1 changed file
with
33 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,34 @@ | ||
FROM nginx:1.15.2-alpine | ||
RUN apk add --no-cache \ | ||
bash \ | ||
python2 \ | ||
py2-pip \ | ||
python2-dev \ | ||
gcc \ | ||
musl-dev \ | ||
libffi-dev \ | ||
openssl-dev | ||
RUN cp -rf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime | ||
RUN pip install pymysql pyyaml | ||
FROM nginx:1.15.6 | ||
# Modify timezone | ||
ENV TZ=Asia/Shanghai | ||
# Add mirror source | ||
RUN mv /etc/apt/sources.list /etc/apt/sources.list.bak && \ | ||
echo 'deb http://mirrors.aliyun.com/debian stretch main contrib non-free' >> /etc/apt/sources.list && \ | ||
echo 'deb http://mirrors.aliyun.com/debian stretch-proposed-updates main contrib non-free' >> /etc/apt/sources.list && \ | ||
echo 'deb http://mirrors.aliyun.com/debian stretch-updates main contrib non-free' >> /etc/apt/sources.list && \ | ||
echo 'deb http://mirrors.aliyun.com/debian-security/ stretch/updates main non-free contrib' >> /etc/apt/sources.list && \ | ||
echo 'deb-src http://mirrors.aliyun.com/debian stretch main contrib non-free' >> /etc/apt/sources.list && \ | ||
echo 'deb-src http://mirrors.aliyun.com/debian stretch-proposed-updates main contrib non-free' >> /etc/apt/sources.list && \ | ||
echo 'deb-src http://mirrors.aliyun.com/debian stretch-updates main contrib non-free' >> /etc/apt/sources.list && \ | ||
echo 'deb-src http://mirrors.aliyun.com/debian-security/ stretch/updates main non-free contrib' >> /etc/apt/sources.list | ||
# Install base packages | ||
RUN apt-get update && apt-get install -y \ | ||
vim \ | ||
tar \ | ||
zip \ | ||
gzip \ | ||
unzip \ | ||
bzip2 \ | ||
curl \ | ||
wget \ | ||
netcat \ | ||
net-tools \ | ||
locales \ | ||
python2.7 \ | ||
python-pip \ | ||
openssh-client \ | ||
ca-certificates && \ | ||
rm -rf /var/lib/apt/lists/* && \ | ||
pip install pymysql==0.9.2 pyyaml==3.13 -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com | ||
# Nginx conf | ||
ADD default.conf /etc/nginx/conf.d/default.conf |