Skip to content

Instantly share code, notes, and snippets.

@lmakarov
Created July 12, 2018 18:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lmakarov/eedfa4c1f573ec8ae90f52f393c5f93f to your computer and use it in GitHub Desktop.
Save lmakarov/eedfa4c1f573ec8ae90f52f393c5f93f to your computer and use it in GitHub Desktop.
Node.js via NVM + yarn installation via official install scripts in Docker
ENV \
NVM_VERSION=0.33.11 \
NODE_VERSION=8.11.3 \
YARN_VERSION=1.8.0
# Don't use -x here - node/nvm print just too much stuff
RUN set -e; \
# NVM and a defaut Node.js version
export PROFILE="$HOME/.profile"; \
curl -fsSL https://raw.githubusercontent.com/creationix/nvm/v${NVM_VERSION}/install.sh | bash; \
# Reload profile to load nvm (needed by Yarn installation below)
. $HOME/.profile; \
# Yarn
export YARN_PROFILE="$HOME/.profile"; \
curl -fsSL https://yarnpkg.com/install.sh | bash -s -- --version ${YARN_VERSION}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment