Created
July 12, 2018 18:46
-
-
Save lmakarov/1519be9f5b37534b0feafe5bf4d244bf to your computer and use it in GitHub Desktop.
Node.js + yarn installation via apt in Docker
This file contains hidden or 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
# Node.js | |
ENV NODE_VERSION=8.x | |
RUN set -xe; \ | |
# Node.js repo | |
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -; \ | |
echo "deb https://deb.nodesource.com/node_${NODE_VERSION} jessie main" | sudo tee /etc/apt/sources.list.d/nodesource.list; \ | |
echo "deb-src https://deb.nodesource.com/node_${NODE_VERSION} jessie main" | sudo tee -a /etc/apt/sources.list.d/nodesource.list; \ | |
# yarn repo | |
curl -fsSL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -; \ | |
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list; \ | |
apt-get update >/dev/null; \ | |
apt-get -y --no-install-recommends install >/dev/null \ | |
nodejs \ | |
yarn \ | |
;\ | |
apt-get clean; rm -rf /var/lib/apt/lists/*; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment