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
The Dockerfile generated by the current build configuration leaves the user set to root, meaning the application runs as root inside the container. This is not recommended, and I think was probably an oversight.
Line 380 sets the user to root so the build can configure the dependencies inside the image, but as you can see there's no subsequent USER {user} directive to reset the user context.
We're in the process of testing this locally, but I think adding this as the final Dockerfile directive should reset the user context back to the user created by sbt-native-packager.
Cmd("USER", (Docker/ daemonUser).value)
I'll make a PR to fix this if the tests we're doing internally look promising.
The text was updated successfully, but these errors were encountered:
The
Dockerfile
generated by the current build configuration leaves the user set toroot
, meaning the application runs asroot
inside the container. This is not recommended, and I think was probably an oversight.scala-steward/build.sbt
Lines 379 to 393 in 1f8ea30
Line 380 sets the user to
root
so the build can configure the dependencies inside the image, but as you can see there's no subsequentUSER {user}
directive to reset the user context.We're in the process of testing this locally, but I think adding this as the final
Dockerfile
directive should reset the user context back to the user created by sbt-native-packager.I'll make a PR to fix this if the tests we're doing internally look promising.
The text was updated successfully, but these errors were encountered: