Last active
May 5, 2019 11:59
-
-
Save GitHub30/7cf453bb5be9a451e415f11986b85c67 to your computer and use it in GitHub Desktop.
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
# https://nodejs.org/ja/download/package-manager/#debian-and-ubuntu-based-linux-distributions-enterprise-linux-fedora-and-snap-packages | |
# https://github.com/nodesource/distributions/blob/master/README.md | |
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - \ | |
&& sudo apt-get install -y nodejs \ | |
&& curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - \ | |
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list \ | |
&& sudo apt-get update \ | |
&& sudo apt-get install -y yarn \ | |
&& echo 'PATH="$HOME/.yarn/bin:$PATH"' >> ~/.profile \ | |
&& source ~/.profile |
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
curl -fsSL https://raw.githubusercontent.com/nodejs/docker-node/master/12/alpine/Dockerfile | sed -e '/^FROM /d' -e 's/^ENV \(\S*\) /\1=/g' -e 's/^RUN //g' -e '/^CMD /d' -e '/ #/d' > install_node_npm_yarn_for_pwd.sh \ | |
&& time bash install_node_npm_yarn_for_pwd.sh |
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
# Prevent PATH parameter-expantions. | |
cat <<'EOF' >> profile | |
# set PATH so it includes user's private bin if it exists | |
if [ -d "$HOME/.yarn/bin" ] ; then | |
PATH="$HOME/.yarn/bin:$PATH" | |
fi | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment