{"id":21607435,"url":"https://github.com/janrockdev/spire-k8s","last_synced_at":"2025-08-04T06:41:19.827Z","repository":{"id":144360344,"uuid":"221082328","full_name":"janrockdev/spire-k8s","owner":"janrockdev","description":null,"archived":false,"fork":false,"pushed_at":"2019-11-11T22:34:24.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-01-24T19:35:00.558Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/janrockdev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-11T22:34:13.000Z","updated_at":"2022-01-20T21:27:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"aca40235-7a17-4d10-811f-e634430ef85a","html_url":"https://github.com/janrockdev/spire-k8s","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janrockdev%2Fspire-k8s","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janrockdev%2Fspire-k8s/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janrockdev%2Fspire-k8s/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janrockdev%2Fspire-k8s/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/janrockdev","download_url":"https://codeload.github.com/janrockdev/spire-k8s/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244246552,"owners_count":20422459,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-24T20:30:50.400Z","updated_at":"2025-03-18T15:21:29.254Z","avatar_url":"https://github.com/janrockdev.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"spire-k8s\n==========\n\nSpire-k8s is an Sbt plugin that builds and pushes Docker images with Kubernetes configuration to your Dockerhub, Google Cloud Container Registry etc.  \n\nRelease: 0.0.1 (Initial Version)\n\nRequirements\n------------\n\n* Sbt\n* Docker (local installation on compile machine)\n\nSetup\n-----\n\nAdd sbt-docker as a dependency in `project/plugins.sbt`:\n```scala\naddSbtPlugin(\"org.yottalabs\" % \"spire-k8s\" % \"0.0.1\")\n```\n\nsbt-docker is an auto plugin, this means that sbt version 1.3.3 or higher is required.\n\nJava 8 or higher is required.\n\n### Defining a Dockerfile\n\nIn order to produce a Docker image a Dockerfile must be defined.\n\nExample with the sbt-assembly plugin:\n```scala\nenablePlugins(DockerPlugin)\n\nimageNames in docker := Seq(ImageName(\"yottalabs/demo:1.0.0\"))\n\ndockerfile in docker := {\n  val jarFile: File = sbt.Keys.`package`.in(Compile, packageBin).value\n  val classpath = (managedClasspath in Compile).value\n  val mainclass = mainClass.in(Compile, packageBin).value.getOrElse(sys.error(\"Expected exactly one main class\"))\n  val jarTarget = s\"/app/${jarFile.getName}\"\n  // Make a colon separated classpath with the JAR file\n  val classpathString = classpath.files.map(\"/app/\" + _.getName)\n    .mkString(\":\") + \":\" + jarTarget\n  new Dockerfile {\n    // Base image\n    from(\"openjdk:8-jre\")\n    // Add all files on the classpath\n    add(classpath.files, \"/app/\")\n    // Add the JAR file\n    add(jarFile, jarTarget)\n    // On launch run Java with the classpath and the main class\n    entryPoint(\"java\", \"-cp\", classpathString, mainclass)\n    expose(9003)\n  }\n}\n```\n\n### Building an image\n\nTo build an image use the `docker` task.\nSimply run `sbt docker` from your prompt or `docker` in the sbt console.\n\n### Pushing an image\n\nAn image that have already been built can be pushed with the `dockerPush` task.\nTo both build and push an image use the `dockerBuildAndPush` task.\n\nThe `imageNames in docker` key is used to determine which image names to push.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanrockdev%2Fspire-k8s","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjanrockdev%2Fspire-k8s","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanrockdev%2Fspire-k8s/lists"}