Skip to content

Instantly share code, notes, and snippets.

@ghsyeung
Last active February 10, 2017 00:50
Show Gist options
  • Save ghsyeung/7102e7fd02b0757778457934897a158c to your computer and use it in GitHub Desktop.
Save ghsyeung/7102e7fd02b0757778457934897a158c to your computer and use it in GitHub Desktop.
Installing Yarn in Alpine
Both approaches from https://github.com/yarnpkg/yarn/issues/1326
RUN apk add --no-cache --virtual .yarn-deps curl gnupg && \
curl -o- -L https://yarnpkg.com/install.sh | sh && \
apk del .yarn-deps
FROM mhart/alpine-node:base-7
MAINTAINER Daniel Lo Nigro <yarn@dan.cx>
ENV YARN_VERSION 0.19.1
ADD https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v${YARN_VERSION}.tar.gz /opt/yarn.tar.gz
RUN cd /opt/ && tar xf yarn.tar.gz && mv dist yarn && rm yarn.tar.gz
ENV PATH $PATH:/opt/yarn/bin/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment