From b931cb6de631151de89173b6e7aa0af36e5387a5 Mon Sep 17 00:00:00 2001 From: Brian Holt Date: Fri, 9 Feb 2024 15:37:10 -0600 Subject: [PATCH] run as the configured sbt-native-packager user instead of root --- build.sbt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index a9e3030fcb..187c76e444 100644 --- a/build.sbt +++ b/build.sbt @@ -390,7 +390,8 @@ lazy val dockerSettings = Def.settings( Cmd("RUN", "npm install --global yarn"), // Ensure binaries are in PATH Cmd("RUN", "echo $PATH"), - Cmd("RUN", "which cs mill mvn node npm sbt scala-cli scalafix scalafmt yarn") + Cmd("RUN", "which cs mill mvn node npm sbt scala-cli scalafix scalafmt yarn"), + Cmd("USER", (Docker / daemonUser).value) ) }, Docker / packageName := s"fthomas/${name.value}",