Skip to content

Instantly share code, notes, and snippets.

@hopewise
Last active April 28, 2016 08:49
Show Gist options
  • Save hopewise/2637698a4022ce8235da2767dca03a66 to your computer and use it in GitHub Desktop.
Save hopewise/2637698a4022ce8235da2767dca03a66 to your computer and use it in GitHub Desktop.
npm
FROM node:latest
MAINTAINER Samir Sabri
# System update
RUN apt-get -q -y update
RUN apt-get -q -y install npm
RUN npm install -g gulp-cli
RUN npm install -g grunt-cli
RUN npm install http-server -g
RUN apt-get clean && rm -r /var/lib/apt/lists/*
EXPOSE 8080
VOLUME ["/app"]
WORKDIR /app
#I will be using the bash to run npm
#ENTRYPOINT ["npm"]
$ docker build -t npm {Dockerfile dir}
$ cd {design folder}
$ docker run -it --name npm-design-server -p 8080:8080 -v "$(pwd)":/app npm /bin/bash
$ npm install http-server -g
$ http-server .
After stoping the server and exit from container, to enter again:
$ docker attach npm-design-server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment