Creating the Deployment Environment
Now it’s time to build a Docker image for this app. The image will be similar to the one you created in Chapter 2, Creating a Deployment Environment, but it will need a few additional dependencies because JRuby won’t be packaged with the app as it was with Warbler. To start, create a Dockerfile in the root directory of the repo and add the following code to it.
| FROM heroku/jvm |
This instructs Docker to use the same JVM base image you used with Warbler. Now you can provision the Docker container with a JRuby installation by adding this code:
| RUN mkdir -p /usr/lib/jruby |
| ENV JRUBY_HOME /usr/lib/jruby |
| RUN curl -s -L \ |
| https://s3.amazonaws.com/jruby.org/downloads/9.0.5.0/jruby-bin-9.0.5.0.tar.gz ... |
Get Deploying with JRuby 9k now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.