Skip to content

Commit

Permalink
Changes to move to master branch & self-update fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Kenney committed Sep 17, 2016
1 parent c1b65ab commit 271292a
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 28 deletions.
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@

## Tagged Dockerfiles

* [`latest` Dockerfile](https://github.com/mkenney/docker-npm/blob/master/Dockerfile), [`debian` Dockerfile](https://github.com/mkenney/docker-npm/blob/master/Dockerfile)
* [`latest` Dockerfile](https://github.com/mkenney/docker-npm/blob/master/Dockerfile), [`alpine` Dockerfile](https://github.com/mkenney/docker-npm/blob/master/Dockerfile)

![build status](https://travis-ci.org/mkenney/docker-npm.svg?branch=master) ![Image size](https://img.shields.io/badge/image size-303MB-blue.svg) ![Node.js](https://img.shields.io/badge/Node.js-v6.2.2-026e00.svg) ![npm](https://img.shields.io/badge/npm-v3.10.2-c12127.svg) ![Bower](https://img.shields.io/badge/Bower-v1.7.9-ffcc2f.svg) ![gulp](https://img.shields.io/badge/gulp-v1.2.1-cf4646.svg) ![grunt](https://img.shields.io/badge/Grunt-v1.2.0-e48632.svg)
![build status](https://travis-ci.org/mkenney/docker-npm.svg?branch=master) ![Image size](https://img.shields.io/badge/image size-56MB-blue.svg) ![Node.js](https://img.shields.io/badge/Node.js-v6.2.2-026e00.svg) ![npm](https://img.shields.io/badge/npm-v3.10.2-c12127.svg) ![Bower](https://img.shields.io/badge/Bower-v1.7.9-ffcc2f.svg) ![gulp](https://img.shields.io/badge/gulp-v1.2.1-cf4646.svg) ![grunt](https://img.shields.io/badge/Grunt-v1.2.0-e48632.svg)

* [`alpine` Dockerfile](https://github.com/mkenney/docker-npm/blob/alpine/Dockerfile)
* [`debian` Dockerfile](https://github.com/mkenney/docker-npm/blob/master/Dockerfile)

![build status](https://travis-ci.org/mkenney/docker-npm.svg?branch=alpine) ![Image size](https://img.shields.io/badge/image size-56MB-blue.svg) ![Node.js](https://img.shields.io/badge/Node.js-v6.2.2-026e00.svg) ![npm](https://img.shields.io/badge/npm-v3.10.2-c12127.svg) ![Bower](https://img.shields.io/badge/Bower-v1.7.9-ffcc2f.svg) ![gulp](https://img.shields.io/badge/gulp-v1.2.1-cf4646.svg) ![grunt](https://img.shields.io/badge/Grunt-v1.2.0-e48632.svg)
![build status](https://travis-ci.org/mkenney/docker-npm.svg?branch=debian) ![Image size](https://img.shields.io/badge/image size-303MB-blue.svg) ![Node.js](https://img.shields.io/badge/Node.js-v6.2.2-026e00.svg) ![npm](https://img.shields.io/badge/npm-v3.10.2-c12127.svg) ![Bower](https://img.shields.io/badge/Bower-v1.7.9-ffcc2f.svg) ![gulp](https://img.shields.io/badge/gulp-v1.2.1-cf4646.svg) ![grunt](https://img.shields.io/badge/Grunt-v1.2.0-e48632.svg)

## About

Expand Down Expand Up @@ -73,6 +73,12 @@ If you need additional modules and/or wrapper scripts [let me know](https://gith

## Change log

### 2016-09-17

Because it produces a much smaller image, I have moved the Alpine build into the `master` branch and the Debian build into it's own `debian` branch and made corresponding changes on hub.docker.com.

Updated the `self-update` command in the scripts to resolve [issue #8](https://github.com/mkenney/docker-npm/issues/8).

### 2016-08-29

I have added a markdown-to-html generator for static documentation ([`markdown-styles`](https://www.npmjs.com/package/markdown-styles)) and a script to run it ([`generate-md`](https://github.com/mkenney/docker-npm/blob/master/bin/generate-md)).
Expand Down
13 changes: 9 additions & 4 deletions bin/bower
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
#!/usr/bin/env sh

TAG=alpine
BRANCH=alpine
TAG=master
BRANCH=master
SCRIPT=bower

if [ "self-update" == "$1" ]; then
docker pull mkenney/npm:$TAG
wget -nv -O $0 https://raw.githubusercontent.com/mkenney/docker-npm/$BRANCH/bin/bower && exit 0
wget -nv --no-check-certificate -O /tmp/$SCRIPT https://raw.githubusercontent.com/mkenney/docker-npm/$BRANCH/bin/$SCRIPT \
&& cat /tmp/$SCRIPT > $0 \
&& rm -f /tmp/$SCRIPT \
&& exit 0
exit 1
else
docker run --rm -t -i -v $(pwd):/src:rw -v $HOME/.ssh:/home/dev/.ssh:ro mkenney/npm:$TAG /run-as-user /usr/local/bin/bower $@
docker run --rm -t -i -v $(pwd):/src:rw -v $HOME/.ssh:/home/dev/.ssh:ro mkenney/npm:$TAG /run-as-user /usr/local/bin/$SCRIPT $@
fi
13 changes: 9 additions & 4 deletions bin/generate-md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
#!/usr/bin/env sh

TAG=alpine
BRANCH=alpine
TAG=master
BRANCH=master
SCRIPT=generate-md

if [ "self-update" == "$1" ]; then
docker pull mkenney/npm:$TAG
wget -nv -O $0 https://raw.githubusercontent.com/mkenney/docker-npm/$BRANCH/bin/generate-md && exit 0
wget -nv --no-check-certificate -O /tmp/$SCRIPT https://raw.githubusercontent.com/mkenney/docker-npm/$BRANCH/bin/$SCRIPT \
&& cat /tmp/$SCRIPT > $0 \
&& rm -f /tmp/$SCRIPT \
&& exit 0
exit 1
else
docker run --rm -t -i -v $(pwd):/src:rw mkenney/npm:$TAG /run-as-user /usr/local/bin/generate-md $@
docker run --rm -t -i -v $(pwd):/src:rw -v $HOME/.ssh:/home/dev/.ssh:ro mkenney/npm:$TAG /run-as-user /usr/local/bin/$SCRIPT $@
fi
13 changes: 9 additions & 4 deletions bin/grunt
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
#!/usr/bin/env sh

TAG=alpine
BRANCH=alpine
TAG=master
BRANCH=master
SCRIPT=grunt

if [ "self-update" == "$1" ]; then
docker pull mkenney/npm:$TAG
wget -nv -O $0 https://raw.githubusercontent.com/mkenney/docker-npm/$BRANCH/bin/grunt && exit 0
wget -nv --no-check-certificate -O /tmp/$SCRIPT https://raw.githubusercontent.com/mkenney/docker-npm/$BRANCH/bin/$SCRIPT \
&& cat /tmp/$SCRIPT > $0 \
&& rm -f /tmp/$SCRIPT \
&& exit 0
exit 1
else
docker run --rm -t -i -v $(pwd):/src:rw mkenney/npm:$TAG /run-as-user /usr/local/bin/grunt $@
docker run --rm -t -i -v $(pwd):/src:rw -v $HOME/.ssh:/home/dev/.ssh:ro mkenney/npm:$TAG /run-as-user /usr/local/bin/$SCRIPT $@
fi
13 changes: 9 additions & 4 deletions bin/gulp
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
#!/usr/bin/env sh

TAG=alpine
BRANCH=alpine
TAG=master
BRANCH=master
SCRIPT=gulp

if [ "self-update" == "$1" ]; then
docker pull mkenney/npm:$TAG
wget -nv -O $0 https://raw.githubusercontent.com/mkenney/docker-npm/$BRANCH/bin/gulp && exit 0
wget -nv --no-check-certificate -O /tmp/$SCRIPT https://raw.githubusercontent.com/mkenney/docker-npm/$BRANCH/bin/$SCRIPT \
&& cat /tmp/$SCRIPT > $0 \
&& rm -f /tmp/$SCRIPT \
&& exit 0
exit 1
else
docker run --rm -t -i -v $(pwd):/src:rw mkenney/npm:$TAG /run-as-user /usr/local/bin/gulp $@
docker run --rm -t -i -v $(pwd):/src:rw -v $HOME/.ssh:/home/dev/.ssh:ro mkenney/npm:$TAG /run-as-user /usr/local/bin/$SCRIPT $@
fi
13 changes: 9 additions & 4 deletions bin/node
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
#!/usr/bin/env sh

TAG=alpine
BRANCH=alpine
TAG=master
BRANCH=master
SCRIPT=node

if [ "self-update" == "$1" ]; then
docker pull mkenney/npm:$TAG
wget -nv -O $0 https://raw.githubusercontent.com/mkenney/docker-npm/$BRANCH/bin/node && exit 0
wget -nv --no-check-certificate -O /tmp/$SCRIPT https://raw.githubusercontent.com/mkenney/docker-npm/$BRANCH/bin/$SCRIPT \
&& cat /tmp/$SCRIPT > $0 \
&& rm -f /tmp/$SCRIPT \
&& exit 0
exit 1
else
docker run --rm -t -i -v $(pwd):/src:rw mkenney/npm:$TAG /run-as-user /usr/local/bin/node $@
docker run --rm -t -i -v $(pwd):/src:rw -v $HOME/.ssh:/home/dev/.ssh:ro mkenney/npm:$TAG /run-as-user /usr/local/bin/$SCRIPT $@
fi
13 changes: 9 additions & 4 deletions bin/npm
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
#!/usr/bin/env sh

TAG=alpine
BRANCH=alpine
TAG=master
BRANCH=master
SCRIPT=npm

if [ "self-update" == "$1" ]; then
docker pull mkenney/npm:$TAG
wget -nv -O $0 https://raw.githubusercontent.com/mkenney/docker-npm/$BRANCH/bin/npm && exit 0
wget -nv --no-check-certificate -O /tmp/$SCRIPT https://raw.githubusercontent.com/mkenney/docker-npm/$BRANCH/bin/$SCRIPT \
&& cat /tmp/$SCRIPT > $0 \
&& rm -f /tmp/$SCRIPT \
&& exit 0
exit 1
else
docker run --rm -t -i -v $(pwd):/src:rw -v $HOME/.ssh:/home/dev/.ssh:ro mkenney/npm:$TAG /run-as-user /usr/local/bin/npm $@
docker run --rm -t -i -v $(pwd):/src:rw -v $HOME/.ssh:/home/dev/.ssh:ro mkenney/npm:$TAG /run-as-user /usr/local/bin/$SCRIPT $@
fi

0 comments on commit 271292a

Please sign in to comment.