Browse Source

nodejs

pull/2/head
Johannes Schickling 10 years ago
parent
commit
e3bcbcc569
  1. 11
      nodejs/Dockerfile
  2. 11
      nodejs/README.md
  3. 17
      nodejs/install.sh

11
nodejs/Dockerfile

@ -0,0 +1,11 @@
FROM debian:jessie
MAINTAINER Johannes Schickling "schickling.j@gmail.com"
ENV DEBIAN_FRONTEND noninteractive
ADD install.sh install.sh
RUN chmod +x install.sh && ./install.sh && rm install.sh
VOLUME ["/source"]
WORKDIR /source
CMD ["bash"]

11
nodejs/README.md

@ -0,0 +1,11 @@
# nodejs
Minimal NodeJS + NPM image
## Usage
```sh
$ docker run --rm -it -v $(pwd):/source schickling/nodejs
```
Mount your local source folder to the container and run it inside the container.

17
nodejs/install.sh

@ -0,0 +1,17 @@
#! /bin/bash
# exit if a command fails
set -e
# install node & npm
apt-get update && apt-get install -y nodejs npm
# alias as node
ln -sf /usr/local/bin/nodejs /usr/local/bin/node
# cleanup package manager
apt-get autoclean && apt-get clean
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# prepare dir
mkdir /source
Loading…
Cancel
Save