Skip to content

Use Paketo Buildpack instead of Dockerfile #481

Closed Answered by gregjotau
tschuehly asked this question in Q&A
Discussion options

You must be logged in to vote

@tschuehly

alias ,d="./gradlew bootBuildImage && VERSION=latest kamal deploy -P"

works as a deploy alias with this gradle config:

// creates smaller docker images, buildpacks
tasks.named<org.springframework.boot.gradle.tasks.bundling.BootBuildImage>("bootBuildImage") {
    imageName.set("username/servicename:latest")
    publish.set(true)
    docker {
        publishRegistry {
            username = "username"
            password = System.getenv("DOCKER_REGISTRY_TOKEN")
        }
    }

    environment.set(
        mapOf(
            "BP_IMAGE_LABELS" to "service=\"servicename\"",
            "BP_JVM_VERSION" to "23"
        )
    )
}

See #497 also

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by jeremy
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants