O'Reilly logo

Hands-On Microservices with Node.js by Diogo Resende

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Managing containers

You may notice that the container is running in the foreground, which is not very useful because your console will be blocked until the service ends. Because our service is supposed to never stop, we should try running the service in the background. If you open another console and list the running container processes, you'll see that it's running:

 

You can see the CONTAINER ID, which, along with the container name, can be used to perform several actions such as restarting and removing containers, as well as the image, and its status and uptime.

Let's stop our container and measure the time to stop it. You'll notice that ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required