A simple demo to use node in docker container
Use two different command: the native docker
and amazing tool docker-compose
Aim to create a docker container which runs a node server listening to 8080, expose to 8081
Run the following command, then visit 127.0.0.1:8081
you should see "hello world!"
$ cd docker-native
$ docker build -t nodedocker_test .
$ docker run -d -p 8080:8081 -v $(pwd)/../src:/src nodedocker_test
$ cd docker-compose
$ docker-compose up -d