How to publish from sbt-native-packager to Google Container Engine?

I am experimenting with docking my Scala / Akka application: I am using sbt-native-packager and would like to deploy to GKE. It seems I could do it by setting the correct values ​​in my file build.sbt

and then running it through sbt docker:publish

.

I'm not sure what the values ​​should be in the build.sbt file. For example, a parameter dockerRepository

should be of the form

[repository.host[:repository.port]]

      

What would be the correct cluster information for the GKE? Thanks a lot for any pointer.

+3


source to share


1 answer


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

  • Replace your Google Cloud Project ID in the box packageName

  • Install dockerRepository

    whichever gcr.io hosts you want to use.

  • Authentication with Google Cloud SDK

  • Run sbt docker:publish

+2


source







All Articles