In this post which is the continuation of Node-API Docker Image ( the Links are at the end of the post), create and run container using the image we build.
Lets check the existence of the image in docker using
Create the container
To build a container to run the API we need only the Image , all the depending Image will be automatically download by Docker.
docker run --name customer -d -p 3000:3000 user-api:latest
The above command will run, customer API in detached mode on port 3000.
Stop and Resume the container
We can stop running a container at any time using docker stop <id/name> and resume with docker start <id/name>
Following Docker Post may deserve a good read