sbt-native-packager
sbt-native-packager copied to clipboard
dockerBuildInit doesn't work
Expected behavior
dockerBuildInit := true should build an image with tini as the entrypoint
Actual behavior
[error] unknown flag: --init
[error] See 'docker build --help'.
[error] java.lang.RuntimeException: Nonzero exit value: 125
[error] at com.typesafe.sbt.packager.docker.DockerPlugin$.publishLocalDocker(DockerPlugin.scala:691)
Information
--init is not and has never been an option for docker build - only docker run.
This is a duplicate of #1505 which was closed without any changes.
I don't think we can make dockerBuildInit work as designed. There's no way for us to know which init is compatible with the base image.
If there's anything actionable here it would be:
- Change the documentation to recommend
docker run --initor build-time code similar to https://github.com/sbt/sbt-native-packager/issues/1257#issuecomment-881136279 - Deprecate or remove the
dockerBuildInitoption