Building your Docker image
In the previous recipe, we created the Dockerfile, which will be used in this recipe to create an image for our microservice. If you are wondering why we would need an image, it is the only way we can ship our software to any system. Once you have your image created and uploaded to a common repository, it will be easier to pull your image from any location.
Getting ready
Before you jump into the actual recipe, it might be a good idea to get yourself familiar with some of the most commonly used Docker commands. In this recipe, we will use the build command. Take a look at this URL to understand the other commands:
https://docs.docker.com/engine/reference/commandline/#/image-commands
. After familiarizing yourself with the commands, open up a new terminal, and change your directory to the root of the geolocation project. Make sure your docker-machine
instance is running. If it is not running, use the docker-machine start
command to run your docker-machine
instance...