Create a simple nodejs hello world application
Add following Dockerfile
FROM node:8.10-alpine
MAINTAINER Koray Güclü
COPY . /var/www
WORKDIR /var/www
EXPOSE 3000
ENTRYPOINT ["npm","start"]
build docker image
docker build -t <username>/node-demo .
run docker image
docker run -p 8080:3000 <username>/node-demo
to test a build first build by using following command. demo is container's name tag
docker build -t demo -f Dockerfile-example .
to check your image and remove container on exit use following command
docker run --rm -it demo