Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EntryPoint #159

Open
jc9464 opened this issue Jan 19, 2021 · 1 comment
Open

EntryPoint #159

jc9464 opened this issue Jan 19, 2021 · 1 comment

Comments

@jc9464
Copy link

jc9464 commented Jan 19, 2021

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.

@mpetuska
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants