This repository has been archived by the owner on Jun 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from divio/topic/alpine
Convert to work on both debian and alpine images
- Loading branch information
Showing
5 changed files
with
45 additions
and
18 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
#!/bin/bash | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
SCRIPT=$(readlink -f "$0") | ||
BASEDIR=$(dirname "$SCRIPT") | ||
OS_RELEASE=$(cat /etc/os-release | grep "^ID=" | cut -d= -f2) | ||
|
||
bash ${BASEDIR}/node.sh | ||
chmod +x ${BASEDIR}/*.sh | ||
|
||
${BASEDIR}/node-${OS_RELEASE}.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
# Node installation for Alpine systems | ||
apk update | ||
|
||
# Get exact package version where rN isn't known | ||
NODE_APK_REV=$(apk search nodejs | grep nodejs-$NODE_VERSION | rev | cut -d'-' -f1 | rev ) | ||
NODE_APK=nodejs@edge=$NODE_VERSION-$NODE_APK_REV | ||
|
||
# Intentionally using NODE version for NPM | ||
NPM_APK_REV=$(apk search nodejs-npm | grep nodejs-npm-$NODE_VERSION | rev | cut -d'-' -f1 | rev ) | ||
NPM_APK=nodejs-npm@edge=$NODE_VERSION-$NPM_APK_REV | ||
|
||
apk add python2 libuv@edge $NODE_APK $NPM_APK | ||
|
||
npm install npm@"$NPM_VERSION" | ||
npm install -g gulp bower | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
source $NVM_DIR/nvm.sh | ||
|
||
# ensure python2 is available by name for gyp | ||
if [ ! -f /usr/bin/python2 ]; then | ||
apt-get update && apt-get install -y python2.7 --no-install-recommends | ||
ln -sn /usr/bin/python2.7 /usr/bin/python2 | ||
fi | ||
|
||
nvm install $NODE_VERSION | ||
nvm alias default $NODE_VERSION | ||
nvm use default | ||
|
||
npm install -g npm@"$NPM_VERSION" | ||
npm install -g gulp bower |
This file was deleted.
Oops, something went wrong.