Skip to content

Commit ba6f7ea

Browse files
committed
Give an absolute path to the entrypoint
1 parent 4440944 commit ba6f7ea

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/scala/com/typesafe/sbt/packager/docker/DockerPlugin.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ object DockerPlugin extends AutoPlugin {
8080
Some((version in Docker).value)
8181
),
8282
dockerUpdateLatest := false,
83-
dockerEntrypoint := Seq("bin/%s" format executableScriptName.value),
83+
dockerEntrypoint := Seq(s"${(defaultLinuxInstallLocation in Docker).value}/bin/${executableScriptName.value}"),
8484
dockerCmd := Seq(),
8585
dockerExecCommand := Seq("docker"),
8686
dockerVersion := Try(Process(dockerExecCommand.value ++ Seq("version", "--format", "'{{.Server.Version}}'")).!!).toOption

src/sbt-test/docker/test-executableScriptName/build.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ maintainer := "Gary Coady <[email protected]>"
1313
TaskKey[Unit]("checkDockerfile") := {
1414
val dockerfile = IO.read((stagingDirectory in Docker).value / "Dockerfile")
1515
assert(
16-
dockerfile.contains("ENTRYPOINT [\"bin/docker-exec\"]\n"),
16+
dockerfile.contains("ENTRYPOINT [\"/opt/docker/bin/docker-exec\"]\n"),
1717
"dockerfile doesn't contain ENTRYPOINT [\"docker-exec\"]\n" + dockerfile
1818
)
1919
streams.value.log.success("Successfully tested control script")

0 commit comments

Comments
 (0)