Open
Description
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.
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 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.
Metadata
Metadata
Assignees
Labels
No labels