Created
September 21, 2016 19:04
-
-
Save zeroasterisk/ad72b6737623d85be28f5ce23e755b90 to your computer and use it in GitHub Desktop.
Build a node lambda function for
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 | |
# If you are developing on OSX on Windows | |
# but you want to run on linux - or in docker - or on AWS Lambda | |
# PhantomJS must be the binary for that OS... | |
# https://github.com/sindresorhus/pageres/issues/275 | |
# | |
# Easiest solution, download inside a docker, running on linux | |
# | |
# This script should be run from within the docker container | |
# | |
# Usage | |
# --------- | |
# docker run -it -v `pwd`:/app node:latest /app/buildPhantomJSAsLinux-InDocker.sh | |
# | |
# when it exits, docker exits. | |
set -e | |
echo "building in docker" | |
cd /app | |
rm -rf node_modules/phantomjs-prebuilt/ | |
npm install |
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 | |
# If you are developing on OSX on Windows | |
# but you want to run on linux - or in docker - or on AWS Lambda | |
# PhantomJS must be the binary for that OS... | |
# https://github.com/sindresorhus/pageres/issues/275 | |
# | |
# Easiest solution, download inside a docker, running on linux | |
# | |
# 1. install docker | |
# 2. Run this script, located as a sibling of your package.json file | |
set -e | |
docker run -it \ | |
-v `pwd`:/app \ | |
node:latest \ | |
/app/buildPhantomJSAsLinux-InDocker.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you for this!