diff --git a/Dockerfile b/Dockerfile index 99d9e2c..ecdc864 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,36 @@ -FROM node:8.11.4-alpine -RUN apk add --no-cache \ - bash \ - curl \ - python2 \ - py2-pip \ - python2-dev \ - gcc \ - musl-dev \ - libffi-dev \ - openssl-dev \ - git -RUN pip install pymysql pyyaml && npm install -g cnpm \ No newline at end of file +FROM gcr.io/kaniko-project/executor:v0.9.0 +FROM node:8.12.0-stretch +COPY --from=0 /kaniko/executor /usr/local/bin/kaniko +# 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 \ + git \ + vim \ + tar \ + zip \ + unzip \ + gzip \ + bzip2 \ + curl \ + wget \ + locales \ + netcat \ + net-tools \ + 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 && \ + npm install -g cnpm