Build Your Own Actor-server Docker Image02 Mar 2016
I am an avid fan of slack and that made me want to search for an open source clone of it.I learned that there is this messaging platform that is very similar to slack except that it is open source and run on the JVM. The other interesting part of it is that it is written in Scala and uses Akka (with Akka Streams) for the most part of the server. I decided to get acquianted and have it deployed on my local machine. I looked it up and end up with this documentation, https://actor.readme.io/docs/server-docker.
Unfortunately, as you may have tried to visit the link, it is currently broken and I am on my own from here.
Building the docker image
I needed the deploy the actor-server locally. I've learned that it uses docker so the next thing to do is, how to build the docker image?
The actor-server project is found under actor-bootstrap. It is a lightweight project meant to be a template for building apps using the actor-messaging sdk and in my case, the server sdk.
The project uses sbt for building the project and I learned that it uses sbt-native-packager plugin for packaging the project to a docker image.
To do this, you just need to start the sbt shell and simply execute the command below.
$ sbt $ > docker:publishLocal
When I tried doing this, I got an error reported by sbt that some of the artifacts were not found or could not be resolved. To workaround this, I have added these resolvers to the build.sbt.
This resolver is for a third-party library called akka-persistence_jdbc.
resolvers += "dnvriend at bintray" at "http://dl.bintray.com/dnvriend/maven"
The resolver for google.android.gcm-server.
resolvers += "GCM Server Repository" at "https://raw.github" + ".com/slorber/gcm-server-repository/master/releases/"