Skip to content

Instantly share code, notes, and snippets.

@zanbaldwin
Last active March 8, 2017 15:07
Show Gist options
  • Save zanbaldwin/0c125f2190f07f05d4af29da75207105 to your computer and use it in GitHub Desktop.
Save zanbaldwin/0c125f2190f07f05d4af29da75207105 to your computer and use it in GitHub Desktop.
Script to setup `node:*-alpine` containers so that node-gyp can build dependencies.
#!/bin/sh
# Really simple, but I need a Gist to remind me each time.
# Make sure the build dependencies of node-gyp are available before running NPM commands.
apk add --no-cache --virtual .npmdeps make python g++
if [ $# -gt 0 ]; then
npm $@
apk del .npmdeps
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment