I am experimenting with dockerizing my Scala/Akka app: I'm using sbt-native-packager and would like to deploy to GKE.
It seems I could do that by setting the right values in my build.sbt
file and then launch it via sbt docker:publish
.
I am not sure what the values should be in the build.sbt file. For instance, the dockerRepository
setting should have the form
[repository.host[:repository.port]]
What would be the right information to put there for a cluster on GKE? Thank you very much for any pointer.
The following build.sbt settings worked for me:
dockerBaseImage := "java:8-jre"
packageName in Docker := "you-gcloud-project-id/api"
maintainer in Docker := "Maintainer"
packageSummary := "Package summary"
packageDescription := "Package description"
dockerRepository := Some("us.gcr.io")
Steps
Substitute your Google Cloud Project ID in the packageName
field
Set dockerRepository
to whichever gcr.io
host
you want to use.
Authenticate using the Google Cloud SDK
Run sbt docker:publish
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With