Skip to content

Commit

Permalink
fix(dockerfile): add yarn (#4844)
Browse files Browse the repository at this point in the history
* added yarn

* verify that gpg key
  • Loading branch information
arnulfojr authored and mergify[bot] committed Nov 8, 2019
1 parent 9cc1e52 commit 2f8d06a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ FROM amazonlinux:2
WORKDIR /app

ENV NODE_VERSION 10.3.0
ENV YARN_VERSION 1.19.1

RUN yum -y --security update \
&& yum install -y \
Expand All @@ -22,7 +23,13 @@ RUN yum -y --security update \
&& grep " node-v$NODE_VERSION-linux-x64.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-x64.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs \
&& rm "node-v$NODE_VERSION-linux-x64.tar.xz" SHASUMS256.txt
&& rm "node-v$NODE_VERSION-linux-x64.tar.xz" SHASUMS256.txt \
&& gpg --list-keys 23E7166788B63E1E >/dev/null 2>&1 || (curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --import) \
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
&& tar zvxf yarn-v$YARN_VERSION.tar.gz -C /usr/local --strip-components=1 --no-same-owner \
&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz

COPY . .

Expand Down

0 comments on commit 2f8d06a

Please sign in to comment.