Open jc9464 opened 3 years ago
Here's a quick workaround you can apply on distDocker
task
doLast {
val dockerfile = stageDir.resolve("Dockerfile")
val content = dockerfile.readLines()
dockerfile.writeText(content.slice(0 until (content.size - 2)).joinToString("\n"))
}
It basically removes default ENTRYPOINT and ADD commands. Change 2 to 1 if you want to keep ADD command.
I have the following in my build.gradle:
distDocker { tagVersion = project.tagVersion registry = rootProject.group addFile("runpdb", "/bin/runpdb") entryPoint(["/bin/runpdb"]) }
However, the Dockerfile created still insists on having the default entryPoint. The end result is that there are 2 ENTRYPOINT entries in the Dockerfile.
Is there some way to tell it not to put the default ENTRYPOINT entry in? I want to override it with the entrypoint that I've provided. The one I've provided needs to be the only one in the generated Dockerfile.