Skip to content

Instantly share code, notes, and snippets.

@satooshi
Last active December 24, 2016 09:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save satooshi/7635ad2077148b5707d0da17cd8f63cb to your computer and use it in GitHub Desktop.
Save satooshi/7635ad2077148b5707d0da17cd8f63cb to your computer and use it in GitHub Desktop.
node installation on docker
# Dockerfile
------------------
FROM library/ubuntu:16.04
RUN apt-get -y update && apt-get install -y build-essential git python libssl-dev curl
# install nodebrew, node
ENV NODEBREW_ROOT=/usr/local/nodebrew
ENV PATH=/usr/local/nodebrew/current/bin:$PATH
RUN export NODE_VERSION=v4.3.2 && curl -L git.io/nodebrew | perl - setup \
&& nodebrew install-binary $NODE_VERSION \
&& nodebrew use $NODE_VERSION
# workspace
RUN mkdir /app
WORKDIR /app
ADD . /app
---------------------
$ docker build -t nodebox .
$ docker images
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment