Having designed a working RESTful microservice in the previous chapter, we'll see in this chapter how to use it in the Docker way, encapsulating the service into a self-contained container so that it's immutable and can be deployed on its own. This chapter describes very explicitly the dependencies of the service and the ways it can be used. The main way to run a service is to run it as a web server, but other operations are possible, such as running unit tests, generating reports, and others. We'll see also how to deploy the service on your local computer for testing and how to share it through an image repository.
The following topics will be covered in this chapter:
- Building your service with a Dockerfile
- Operating with an immutable container
- Configuring your service
- Deploying the Docker service locally
- Pushing...