You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using sbt docker:stage to generate a Dockerfile which is used by docker-compose to build our application image. Our Windows developers are facing the fact that the entrypoint script gets added to the image without the execution bit set.
The Dockerfile which is generated by sbt docker:stage does not set the execution bit on the entrypoint script. This is not an issue issue for Mac / Linux users but for Windows users the file get added with a default 664 mask.
To workaround this issues we needed to add the following code fragment below to our dockerSettings.
dockerCommands ++= Seq (
// setting the run script executable
ExecCmd("RUN", "chmod", "u+x", s"${(defaultLinuxInstallLocation in Docker).value}/bin/${executableScriptName.value}")
)
It would be more robust if a chmod u+x <entrypointscript> line was added to the generated Dockerfile by default by the sbt-native-packager.
Regards
Sebastiaan
The text was updated successfully, but these errors were encountered:
Thanks for your feature request. The layer added by this command is rather small as it only affects this one bin, right?
I'm not sure how we should integrate this fix. Docker support for windows is really getting good, so others are likely to have this problem as well. My main concern is that putting OS specific fixes into the general plugin will finally bloat the plugin and make it really hard to change. Furthermore we don't have an CI for our docker infrastructure, which makes changes even harder to review. Setting up a windows/docker environment however is really tough with free-for-open-source tools ( at least at the moment).
So I would have two suggestions for this fix
Provide the workaround in the docs
Provide a WindowsDockerPlugin, which adds these fixes for windows and user can enable it if necessary
I think the chances getting permissions to work on windows are rather... non existent?
We are using
sbt docker:stage
to generate a Dockerfile which is used by docker-compose to build our application image. Our Windows developers are facing the fact that the entrypoint script gets added to the image without the execution bit set.The Dockerfile which is generated by
sbt docker:stage
does not set the execution bit on the entrypoint script. This is not an issue issue for Mac / Linux users but for Windows users the file get added with a default 664 mask.To workaround this issues we needed to add the following code fragment below to our dockerSettings.
It would be more robust if a
chmod u+x <entrypointscript>
line was added to the generatedDockerfile
by default by the sbt-native-packager.Regards
Sebastiaan
The text was updated successfully, but these errors were encountered: