Public Repository

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description

This image is intended for local development using Typesafe's Activator platform.

Base image: jalpine:jdk (Oracle JDK running on Alpine Linux).

Technology Stack

|       Activator        |
|   Play, Scala, Akka    |
|     Oracle JDK 1.8     |
|      Alpine Linux      |
|         Docker         |

Configuration + Ports

The image exposes the following ports:

80 443 (from base image - jalpine:jdk)
9000 (default Netty HTTP server port)


The default (latest) tag for this image installs the Typesafe Activator minimal package which contains no dependencies. This means that when you run any activator commands for the first time you will need to wait for some time (depending on your network bandwidth) while Activator updates the local Ivy cache with all the required dependencies. This should be a one-time task for each container you setup based off of this image.

Why not use the full Activator package?

An alternative would have been to install the full Activator package within the image but this ships with around 500mb of cached libraries, many of which you may not need.

If you create a container from this image and then create a barebones project - using the Play-Scala template for example - then Activator will pull down around 120mb of dependencies. Depending on how much of Typesafe's reactive stack you wish to use, its better to keep the Docker image lightweight by just providing the minimal Activator package which you can then build on for whatever your needs. Just remember that the first time you run activator commands your build will take a hit as the required dependencies are pulled down and cached.

Create your own image with a populated cache

If you need to create multiple containers using this image (maybe a whole team decide to use it locally) then you could create your own image after populating the Ivy cache.

# in the Docker CLI, pull the image
$ docker pull jonjack/activator

# run a container
$ docker run -it jonjack/activator /bin/sh
# now inside the container, run activator & wait a while while the ivy cache gets populated
$ activator

Getting org.scala-sbt sbt 0.13.8 ...
downloading ...
    [SUCCESSFUL ] org.scala-sbt#sbt;0.13.8!sbt.jar (2936ms)
# exit the container
$ exit

# check the container ID
$ docker ps -a
75c7fa155037     ff021bb4e523    "/bin/sh"     4 hours ago   Exited 4 mins ago

# commit the updated container to a new image
$ docker commit -m "Populated Ivy cache" -a "Joe Bloggs" 75c7fa155037 yourorg/activator:v2

# now you can see your version of the image with the size to reflect the updated cache
$ docker images
REPOSITORY            TAG       IMAGE ID         CREATED          VIRTUAL SIZE
yourorg/activator     v2        82a130884e00     A minute ago     400.9 MB
activator             latest    ff021bb4e523     4 hours ago      171.8 MB

# now you can use your own image for your Activator containers
$ docker run -it yourorg/activator:v2 /bin/sh

To run the container in detached mode pass your application start script as the command.

docker run -d -v /host/application:/app yourorg/activator:v2 /app/start-script
Docker Pull Command

Comments (0)