Created
March 5, 2018 03:12
-
-
Save danielgormly/7ccedea38919f0cbedfca0ecac862f6a to your computer and use it in GitHub Desktop.
Amazon Linux NPM Install
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
rm -rf node_modules/sharp | |
docker build -t awslinux-npm ./awslinux-npm | |
docker run -v "$PWD":/var/task awslinux-npm npm install |
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
FROM amazonlinux | |
ENV VERSION="8.9.4" | |
ENV NVM_DIR="/root/.nvm" | |
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash \ | |
&& [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" \ | |
&& nvm install $VERSION | |
ENV PATH="${NVM_DIR}/versions/node/v${VERSION}/bin:${PATH}" | |
WORKDIR /var/task |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This script runs npm install on awslinux for local building for the purpose of remote pushing