Last active
April 28, 2016 08:49
-
-
Save hopewise/2637698a4022ce8235da2767dca03a66 to your computer and use it in GitHub Desktop.
npm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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