July 2016
Intermediate to advanced
150 pages
4h 24m
English
A Docker image is defined by a Dockerfile, which is a text document containing instructions Docker follows as it provisions a new container. To create a Docker image for your WAR file, you must create a Dockerfile in the project.
To begin, move into the root directory of the stock-service application you implemented in Chapter 1, Getting Started with JRuby.
| | $ cd ~/code/stock-service |
Then create a Dockerfile in that directory and put the following code in it:
| | FROM heroku/jvm |
| | |
| | ADD ./stock-service.war /app/user/ |
This defines an image that inherits from the heroku/jvm image. It then tells Docker to add the WAR file from the local machine to the /app/user directory ...
Read now
Unlock full access