-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Node.js images to include yarn #2703
Closed
Closed
Conversation
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
This update adds the latest version of Yarn (0.21.3) to all the Node.js Docker images and variants: - nodejs/docker-node#337 - https://yarnpkg.com/
This was referenced Feb 28, 2017
diff --git a/node_alpine/Dockerfile b/node_alpine/Dockerfile
index e011856..f3cb0bd 100644
--- a/node_alpine/Dockerfile
+++ b/node_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/node_argon-alpine/Dockerfile b/node_argon-alpine/Dockerfile
index b4c0f04..21bb20b 100644
--- a/node_argon-alpine/Dockerfile
+++ b/node_argon-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/node_argon-slim/Dockerfile b/node_argon-slim/Dockerfile
index 1d369d4..4f6f56e 100644
--- a/node_argon-slim/Dockerfile
+++ b/node_argon-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/node_argon-wheezy/Dockerfile b/node_argon-wheezy/Dockerfile
index 7e5c3b7..01c6c2d 100644
--- a/node_argon-wheezy/Dockerfile
+++ b/node_argon-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/node_argon/Dockerfile b/node_argon/Dockerfile
index f49aa14..4d721b8 100644
--- a/node_argon/Dockerfile
+++ b/node_argon/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/node_boron-alpine/Dockerfile b/node_boron-alpine/Dockerfile
index 4657b94..29a6064 100644
--- a/node_boron-alpine/Dockerfile
+++ b/node_boron-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/node_boron-slim/Dockerfile b/node_boron-slim/Dockerfile
index d3c3c86..9c83685 100644
--- a/node_boron-slim/Dockerfile
+++ b/node_boron-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/node_boron-wheezy/Dockerfile b/node_boron-wheezy/Dockerfile
index 1073617..6f3555f 100644
--- a/node_boron-wheezy/Dockerfile
+++ b/node_boron-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/node_boron/Dockerfile b/node_boron/Dockerfile
index 8eebe93..57a7304 100644
--- a/node_boron/Dockerfile
+++ b/node_boron/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/node_latest/Dockerfile b/node_latest/Dockerfile
index 0429704..dcff70d 100644
--- a/node_latest/Dockerfile
+++ b/node_latest/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/node_slim/Dockerfile b/node_slim/Dockerfile
index 6389129..203e9d8 100644
--- a/node_slim/Dockerfile
+++ b/node_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/node_wheezy/Dockerfile b/node_wheezy/Dockerfile
index 69eb49c..4af69d2 100644
--- a/node_wheezy/Dockerfile
+++ b/node_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" ] |
Oh, just a few fixes are needed to ensure gpg doesn't ever ask for input, and that curl fails when it should: (sorry I didn't notice them earlier 😞) - && gpg --verify yarn.js.asc yarn.js \
+ && gpg --batch --verify yarn.js.asc yarn.js \
# and
- curl -SL
+ curl -fSL |
@yosifkit on it. New PR coming soon. |
This was referenced Mar 1, 2017
New PR: #2705 |
Merged yarn addition in #2705. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This update adds the latest version of Yarn (0.21.3) to all the Node.js
Docker images and variants: