Skip to content

Instantly share code, notes, and snippets.

@thom-nic
Created June 18, 2014 15:15
Show Gist options
  • Star 22 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save thom-nic/724a2af410e90a654e35 to your computer and use it in GitHub Desktop.
Save thom-nic/724a2af410e90a654e35 to your computer and use it in GitHub Desktop.
Node.js Dockerfile based on ubuntu 14.04. This is a little smaller than dockerfile/nodejs which depends on python
# Node.js app Docker file
FROM ubuntu:14.04
MAINTAINER Thom Nichols "thom@thomnichols.org"
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update
RUN apt-get -qq update
RUN apt-get install -y nodejs npm
# TODO could uninstall some build dependencies
# fucking debian installs `node` as `nodejs`
RUN update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10
VOLUME ["/data"]
ADD . /data
RUN cd /data && npm install
EXPOSE 8888
WORKDIR /data
CMD ["npm", "start"]
@drexdelta1
Copy link

thanks , helped

@Venkat003
Copy link

I need to install node.js 8.12.0 inside docker file
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
RUN apt-get -y install nodejs
I have tried with these two commands but error response 100, I got
Can anyone may be help on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment