From a86d32ab9a687de2c68cdcc4aafcd9d27e96106a Mon Sep 17 00:00:00 2001 From: Peter Petrov Date: Thu, 23 Feb 2017 14:53:58 +0200 Subject: [PATCH 1/2] Add Yarn --- Dockerfile-alpine.template | 16 ++++++++++++++++ Dockerfile-slim.template | 15 +++++++++++++++ Dockerfile-wheezy.template | 15 +++++++++++++++ Dockerfile.template | 15 +++++++++++++++ update.sh | 4 ++++ 5 files changed, 65 insertions(+) diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index fec6dff4f..4d8c6ca7c 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -43,4 +43,20 @@ RUN adduser -D -u 1000 node \ && rm -Rf "node-v$NODE_VERSION" \ && rm "node-v$NODE_VERSION.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt +ENV YARN_VERSION 0.0.0 + +RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg \ + && for key in \ + 6A010C5166006599AA17F08146C2130DFD2497F5 \ + ; do \ + gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + done \ + && curl -SL -o yarn.js "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-legacy-$YARN_VERSION.js" \ + && curl -SL -o yarn.js.asc "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-legacy-$YARN_VERSION.js.asc" \ + && gpg --verify yarn.js.asc yarn.js \ + && rm yarn.js.asc \ + && mv yarn.js /usr/local/bin/yarn \ + && chmod +x /usr/local/bin/yarn \ + && apk del .build-deps-yarn + CMD [ "node" ] diff --git a/Dockerfile-slim.template b/Dockerfile-slim.template index 46f93e8c6..6c98519c6 100644 --- a/Dockerfile-slim.template +++ b/Dockerfile-slim.template @@ -35,4 +35,19 @@ RUN buildDeps='xz-utils' \ && apt-get purge -y --auto-remove $buildDeps \ && ln -s /usr/local/bin/node /usr/local/bin/nodejs +ENV YARN_VERSION 0.0.0 + +RUN set -ex \ + && for key in \ + 6A010C5166006599AA17F08146C2130DFD2497F5 \ + ; do \ + gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + done \ + && curl -SL -o yarn.js "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-legacy-$YARN_VERSION.js" \ + && curl -SL -o yarn.js.asc "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-legacy-$YARN_VERSION.js.asc" \ + && gpg --verify yarn.js.asc yarn.js \ + && rm yarn.js.asc \ + && mv yarn.js /usr/local/bin/yarn \ + && chmod +x /usr/local/bin/yarn + CMD [ "node" ] diff --git a/Dockerfile-wheezy.template b/Dockerfile-wheezy.template index 9a9ecb30e..38e4a4f3f 100644 --- a/Dockerfile-wheezy.template +++ b/Dockerfile-wheezy.template @@ -30,4 +30,19 @@ RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux- && rm "node-v$NODE_VERSION-linux-x64.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \ && ln -s /usr/local/bin/node /usr/local/bin/nodejs +ENV YARN_VERSION 0.0.0 + +RUN set -ex \ + && for key in \ + 6A010C5166006599AA17F08146C2130DFD2497F5 \ + ; do \ + gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + done \ + && curl -SL -o yarn.js "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-legacy-$YARN_VERSION.js" \ + && curl -SL -o yarn.js.asc "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-legacy-$YARN_VERSION.js.asc" \ + && gpg --verify yarn.js.asc yarn.js \ + && rm yarn.js.asc \ + && mv yarn.js /usr/local/bin/yarn \ + && chmod +x /usr/local/bin/yarn + CMD [ "node" ] diff --git a/Dockerfile.template b/Dockerfile.template index 15dd963a6..3dbe943a8 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -30,4 +30,19 @@ RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux- && rm "node-v$NODE_VERSION-linux-x64.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \ && ln -s /usr/local/bin/node /usr/local/bin/nodejs +ENV YARN_VERSION 0.0.0 + +RUN set -ex \ + && for key in \ + 6A010C5166006599AA17F08146C2130DFD2497F5 \ + ; do \ + gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + done \ + && curl -SL -o yarn.js "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-legacy-$YARN_VERSION.js" \ + && curl -SL -o yarn.js.asc "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-legacy-$YARN_VERSION.js.asc" \ + && gpg --verify yarn.js.asc yarn.js \ + && rm yarn.js.asc \ + && mv yarn.js /usr/local/bin/yarn \ + && chmod +x /usr/local/bin/yarn + CMD [ "node" ] diff --git a/update.sh b/update.sh index e67b4d102..6dcc49756 100755 --- a/update.sh +++ b/update.sh @@ -13,12 +13,16 @@ versions=( "${versions[@]%/}" ) template= dockerfile= +yarnVersion="$(curl -sSL https://yarnpkg.com/latest-version)" + function update_node_version { fullVersion="$(curl -sSL --compressed 'https://nodejs.org/dist' | grep ' Date: Tue, 28 Feb 2017 16:14:25 +0200 Subject: [PATCH 2/2] Include auto-generated Dockerfiles --- 4.8/Dockerfile | 15 +++++++++++++++ 4.8/alpine/Dockerfile | 16 ++++++++++++++++ 4.8/slim/Dockerfile | 15 +++++++++++++++ 4.8/wheezy/Dockerfile | 15 +++++++++++++++ 6.10/Dockerfile | 15 +++++++++++++++ 6.10/alpine/Dockerfile | 16 ++++++++++++++++ 6.10/slim/Dockerfile | 15 +++++++++++++++ 6.10/wheezy/Dockerfile | 15 +++++++++++++++ 7.6/Dockerfile | 15 +++++++++++++++ 7.6/alpine/Dockerfile | 16 ++++++++++++++++ 7.6/slim/Dockerfile | 15 +++++++++++++++ 7.6/wheezy/Dockerfile | 15 +++++++++++++++ 12 files changed, 183 insertions(+) diff --git a/4.8/Dockerfile b/4.8/Dockerfile index f49aa1478..4d721b8d4 100644 --- a/4.8/Dockerfile +++ b/4.8/Dockerfile @@ -30,4 +30,19 @@ RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux- && rm "node-v$NODE_VERSION-linux-x64.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \ && ln -s /usr/local/bin/node /usr/local/bin/nodejs +ENV YARN_VERSION 0.21.3 + +RUN set -ex \ + && for key in \ + 6A010C5166006599AA17F08146C2130DFD2497F5 \ + ; do \ + gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + done \ + && curl -SL -o yarn.js "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-legacy-$YARN_VERSION.js" \ + && curl -SL -o yarn.js.asc "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-legacy-$YARN_VERSION.js.asc" \ + && gpg --verify yarn.js.asc yarn.js \ + && rm yarn.js.asc \ + && mv yarn.js /usr/local/bin/yarn \ + && chmod +x /usr/local/bin/yarn + CMD [ "node" ] diff --git a/4.8/alpine/Dockerfile b/4.8/alpine/Dockerfile index b4c0f042f..21bb20bd4 100644 --- a/4.8/alpine/Dockerfile +++ b/4.8/alpine/Dockerfile @@ -43,4 +43,20 @@ RUN adduser -D -u 1000 node \ && rm -Rf "node-v$NODE_VERSION" \ && rm "node-v$NODE_VERSION.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt +ENV YARN_VERSION 0.21.3 + +RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg \ + && for key in \ + 6A010C5166006599AA17F08146C2130DFD2497F5 \ + ; do \ + gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + done \ + && curl -SL -o yarn.js "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-legacy-$YARN_VERSION.js" \ + && curl -SL -o yarn.js.asc "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-legacy-$YARN_VERSION.js.asc" \ + && gpg --verify yarn.js.asc yarn.js \ + && rm yarn.js.asc \ + && mv yarn.js /usr/local/bin/yarn \ + && chmod +x /usr/local/bin/yarn \ + && apk del .build-deps-yarn + CMD [ "node" ] diff --git a/4.8/slim/Dockerfile b/4.8/slim/Dockerfile index 1d369d483..4f6f56efa 100644 --- a/4.8/slim/Dockerfile +++ b/4.8/slim/Dockerfile @@ -35,4 +35,19 @@ RUN buildDeps='xz-utils' \ && apt-get purge -y --auto-remove $buildDeps \ && ln -s /usr/local/bin/node /usr/local/bin/nodejs +ENV YARN_VERSION 0.21.3 + +RUN set -ex \ + && for key in \ + 6A010C5166006599AA17F08146C2130DFD2497F5 \ + ; do \ + gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + done \ + && curl -SL -o yarn.js "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-legacy-$YARN_VERSION.js" \ + && curl -SL -o yarn.js.asc "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-legacy-$YARN_VERSION.js.asc" \ + && gpg --verify yarn.js.asc yarn.js \ + && rm yarn.js.asc \ + && mv yarn.js /usr/local/bin/yarn \ + && chmod +x /usr/local/bin/yarn + CMD [ "node" ] diff --git a/4.8/wheezy/Dockerfile b/4.8/wheezy/Dockerfile index 7e5c3b77b..01c6c2df2 100644 --- a/4.8/wheezy/Dockerfile +++ b/4.8/wheezy/Dockerfile @@ -30,4 +30,19 @@ RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux- && rm "node-v$NODE_VERSION-linux-x64.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \ && ln -s /usr/local/bin/node /usr/local/bin/nodejs +ENV YARN_VERSION 0.21.3 + +RUN set -ex \ + && for key in \ + 6A010C5166006599AA17F08146C2130DFD2497F5 \ + ; do \ + gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + done \ + && curl -SL -o yarn.js "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-legacy-$YARN_VERSION.js" \ + && curl -SL -o yarn.js.asc "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-legacy-$YARN_VERSION.js.asc" \ + && gpg --verify yarn.js.asc yarn.js \ + && rm yarn.js.asc \ + && mv yarn.js /usr/local/bin/yarn \ + && chmod +x /usr/local/bin/yarn + CMD [ "node" ] diff --git a/6.10/Dockerfile b/6.10/Dockerfile index 8eebe9312..57a730491 100644 --- a/6.10/Dockerfile +++ b/6.10/Dockerfile @@ -30,4 +30,19 @@ RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux- && rm "node-v$NODE_VERSION-linux-x64.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \ && ln -s /usr/local/bin/node /usr/local/bin/nodejs +ENV YARN_VERSION 0.21.3 + +RUN set -ex \ + && for key in \ + 6A010C5166006599AA17F08146C2130DFD2497F5 \ + ; do \ + gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + done \ + && curl -SL -o yarn.js "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-legacy-$YARN_VERSION.js" \ + && curl -SL -o yarn.js.asc "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-legacy-$YARN_VERSION.js.asc" \ + && gpg --verify yarn.js.asc yarn.js \ + && rm yarn.js.asc \ + && mv yarn.js /usr/local/bin/yarn \ + && chmod +x /usr/local/bin/yarn + CMD [ "node" ] diff --git a/6.10/alpine/Dockerfile b/6.10/alpine/Dockerfile index 4657b94e0..29a60641e 100644 --- a/6.10/alpine/Dockerfile +++ b/6.10/alpine/Dockerfile @@ -43,4 +43,20 @@ RUN adduser -D -u 1000 node \ && rm -Rf "node-v$NODE_VERSION" \ && rm "node-v$NODE_VERSION.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt +ENV YARN_VERSION 0.21.3 + +RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg \ + && for key in \ + 6A010C5166006599AA17F08146C2130DFD2497F5 \ + ; do \ + gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + done \ + && curl -SL -o yarn.js "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-legacy-$YARN_VERSION.js" \ + && curl -SL -o yarn.js.asc "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-legacy-$YARN_VERSION.js.asc" \ + && gpg --verify yarn.js.asc yarn.js \ + && rm yarn.js.asc \ + && mv yarn.js /usr/local/bin/yarn \ + && chmod +x /usr/local/bin/yarn \ + && apk del .build-deps-yarn + CMD [ "node" ] diff --git a/6.10/slim/Dockerfile b/6.10/slim/Dockerfile index d3c3c862a..9c836856c 100644 --- a/6.10/slim/Dockerfile +++ b/6.10/slim/Dockerfile @@ -35,4 +35,19 @@ RUN buildDeps='xz-utils' \ && apt-get purge -y --auto-remove $buildDeps \ && ln -s /usr/local/bin/node /usr/local/bin/nodejs +ENV YARN_VERSION 0.21.3 + +RUN set -ex \ + && for key in \ + 6A010C5166006599AA17F08146C2130DFD2497F5 \ + ; do \ + gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + done \ + && curl -SL -o yarn.js "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-legacy-$YARN_VERSION.js" \ + && curl -SL -o yarn.js.asc "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-legacy-$YARN_VERSION.js.asc" \ + && gpg --verify yarn.js.asc yarn.js \ + && rm yarn.js.asc \ + && mv yarn.js /usr/local/bin/yarn \ + && chmod +x /usr/local/bin/yarn + CMD [ "node" ] diff --git a/6.10/wheezy/Dockerfile b/6.10/wheezy/Dockerfile index 1073617b0..6f3555f0f 100644 --- a/6.10/wheezy/Dockerfile +++ b/6.10/wheezy/Dockerfile @@ -30,4 +30,19 @@ RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux- && rm "node-v$NODE_VERSION-linux-x64.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \ && ln -s /usr/local/bin/node /usr/local/bin/nodejs +ENV YARN_VERSION 0.21.3 + +RUN set -ex \ + && for key in \ + 6A010C5166006599AA17F08146C2130DFD2497F5 \ + ; do \ + gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + done \ + && curl -SL -o yarn.js "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-legacy-$YARN_VERSION.js" \ + && curl -SL -o yarn.js.asc "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-legacy-$YARN_VERSION.js.asc" \ + && gpg --verify yarn.js.asc yarn.js \ + && rm yarn.js.asc \ + && mv yarn.js /usr/local/bin/yarn \ + && chmod +x /usr/local/bin/yarn + CMD [ "node" ] diff --git a/7.6/Dockerfile b/7.6/Dockerfile index 042970484..dcff70d74 100644 --- a/7.6/Dockerfile +++ b/7.6/Dockerfile @@ -30,4 +30,19 @@ RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux- && rm "node-v$NODE_VERSION-linux-x64.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \ && ln -s /usr/local/bin/node /usr/local/bin/nodejs +ENV YARN_VERSION 0.21.3 + +RUN set -ex \ + && for key in \ + 6A010C5166006599AA17F08146C2130DFD2497F5 \ + ; do \ + gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + done \ + && curl -SL -o yarn.js "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-legacy-$YARN_VERSION.js" \ + && curl -SL -o yarn.js.asc "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-legacy-$YARN_VERSION.js.asc" \ + && gpg --verify yarn.js.asc yarn.js \ + && rm yarn.js.asc \ + && mv yarn.js /usr/local/bin/yarn \ + && chmod +x /usr/local/bin/yarn + CMD [ "node" ] diff --git a/7.6/alpine/Dockerfile b/7.6/alpine/Dockerfile index e01185628..f3cb0bd49 100644 --- a/7.6/alpine/Dockerfile +++ b/7.6/alpine/Dockerfile @@ -43,4 +43,20 @@ RUN adduser -D -u 1000 node \ && rm -Rf "node-v$NODE_VERSION" \ && rm "node-v$NODE_VERSION.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt +ENV YARN_VERSION 0.21.3 + +RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg \ + && for key in \ + 6A010C5166006599AA17F08146C2130DFD2497F5 \ + ; do \ + gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + done \ + && curl -SL -o yarn.js "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-legacy-$YARN_VERSION.js" \ + && curl -SL -o yarn.js.asc "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-legacy-$YARN_VERSION.js.asc" \ + && gpg --verify yarn.js.asc yarn.js \ + && rm yarn.js.asc \ + && mv yarn.js /usr/local/bin/yarn \ + && chmod +x /usr/local/bin/yarn \ + && apk del .build-deps-yarn + CMD [ "node" ] diff --git a/7.6/slim/Dockerfile b/7.6/slim/Dockerfile index 6389129da..203e9d80f 100644 --- a/7.6/slim/Dockerfile +++ b/7.6/slim/Dockerfile @@ -35,4 +35,19 @@ RUN buildDeps='xz-utils' \ && apt-get purge -y --auto-remove $buildDeps \ && ln -s /usr/local/bin/node /usr/local/bin/nodejs +ENV YARN_VERSION 0.21.3 + +RUN set -ex \ + && for key in \ + 6A010C5166006599AA17F08146C2130DFD2497F5 \ + ; do \ + gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + done \ + && curl -SL -o yarn.js "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-legacy-$YARN_VERSION.js" \ + && curl -SL -o yarn.js.asc "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-legacy-$YARN_VERSION.js.asc" \ + && gpg --verify yarn.js.asc yarn.js \ + && rm yarn.js.asc \ + && mv yarn.js /usr/local/bin/yarn \ + && chmod +x /usr/local/bin/yarn + CMD [ "node" ] diff --git a/7.6/wheezy/Dockerfile b/7.6/wheezy/Dockerfile index 69eb49cdc..4af69d2f9 100644 --- a/7.6/wheezy/Dockerfile +++ b/7.6/wheezy/Dockerfile @@ -30,4 +30,19 @@ RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux- && rm "node-v$NODE_VERSION-linux-x64.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \ && ln -s /usr/local/bin/node /usr/local/bin/nodejs +ENV YARN_VERSION 0.21.3 + +RUN set -ex \ + && for key in \ + 6A010C5166006599AA17F08146C2130DFD2497F5 \ + ; do \ + gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + done \ + && curl -SL -o yarn.js "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-legacy-$YARN_VERSION.js" \ + && curl -SL -o yarn.js.asc "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-legacy-$YARN_VERSION.js.asc" \ + && gpg --verify yarn.js.asc yarn.js \ + && rm yarn.js.asc \ + && mv yarn.js /usr/local/bin/yarn \ + && chmod +x /usr/local/bin/yarn + CMD [ "node" ]