To install docker on mac OS X:

brew cask install docker

To list all existing dockers:

docker ps -a

Top completely remove a docker:

docker rm <type docker id given by docker ps -a>

To stop a docker:

docker stop <0eadd4062475>
$ docker container ls
$ docker container stop webserver
$ docker container ls -a
$ docker container rm webserver
$ docker image ls
$ docker image rm nginx

To build a docker image:

docker build -t wagnermatos/harper-checkout .
# where wagnermatos is the tag and harper-checkout is the image name
# special attention to be paid to the "." at the end to refer to the
# Dockerfile in the existing directory

To run the node app

docker run -p 10010:8080 -d harper

To print the output of your app:

# Get container ID
$ docker ps

# Print app output
$ docker logs <container id>

# Example
Running on <http://localhost:8080>

# Enter the container
$ docker exec -it <container id> /bin/bash

# Stop running container
docker stop <container id>