From cce123a2fff74f29a9bd5c4b3ee133d0c33ad994 Mon Sep 17 00:00:00 2001 From: TimeBye Date: Tue, 13 Nov 2018 13:19:07 +0800 Subject: [PATCH 1/3] [IMP]update base image --- Dockerfile | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index 99d9e2c..7fc5de7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,19 @@ -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 node:8.12.0-stretch +# 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 locales openssh-client ca-certificates tar gzip net-tools netcat unzip zip bzip2 curl wget python2.7 python-pip git \ + && 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 \ No newline at end of file From f1a8c843a275ea469097488cd87433cb3281d443 Mon Sep 17 00:00:00 2001 From: TimeBye Date: Thu, 15 Nov 2018 09:38:23 +0800 Subject: [PATCH 2/3] [IMP]format code --- Dockerfile | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7fc5de7..d8f9133 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,22 @@ RUN mv /etc/apt/sources.list /etc/apt/sources.list.bak && \ 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 locales openssh-client ca-certificates tar gzip net-tools netcat unzip zip bzip2 curl wget python2.7 python-pip git \ - && 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 \ No newline at end of file + 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 \ No newline at end of file From e58c550335cdfd5d0d152fdb3ccb521f9857651d Mon Sep 17 00:00:00 2001 From: TimeBye Date: Wed, 13 Mar 2019 10:24:12 +0800 Subject: [PATCH 3/3] [IMP]add kaniko --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d8f9133..ecdc864 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,6 @@ +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 @@ -31,4 +33,4 @@ RUN apt-get update && apt-get install -y \ 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 \ No newline at end of file + npm install -g cnpm