-
-
Save nyaocat/fda1f31ec0df6a08f67c8237e0892b84 to your computer and use it in GitHub Desktop.
nodeをインストールしたくないので docker で代用する(下記ファイルを PATH の通る場所に node, npm, npx と名付けてそれぞれ保存すると使える)
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
#!/bin/bash | |
set -eu | |
mkdir -p $HOME/.config $HOME/.npm | |
docker run \ | |
-it --rm \ | |
--tmpfs "/tmp" \ | |
-v "$PWD:$PWD" \ | |
-v "$HOME/.config:$HOME/.config" \ | |
-v "$HOME/.npm:$HOME/.npm" \ | |
-w "$PWD" \ | |
-u "$(id -u):$(id -g)" \ | |
-v /etc/passwd:/etc/passwd:ro \ | |
-h "$(hostname)" \ | |
--net=host \ | |
node:10.15.3 \ | |
"$(basename $0)" "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment