We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba3fd40 commit 391c250Copy full SHA for 391c250
1 file changed
Dockerfile
@@ -14,4 +14,13 @@ COPY --from=build /out /App
14
COPY dab-config.json /App/dab-config.json
15
WORKDIR /App
16
ENV ASPNETCORE_URLS=http://+:5000
17
+
18
+# Run as the non-root "app" user (UID/GID 64198) that ships with the
19
+# mcr.microsoft.com/dotnet/aspnet base image. DAB is just an ASP.NET Core
20
+# process and does not require root privileges. Declaring USER explicitly
21
+# sets the image's Config.User field so image scanners (e.g. Checkmarx One)
22
+# that require a non-root user in the final stage are satisfied.
23
+# Port 5000 is above 1024 so a non-root user can bind to it without CAP_NET_BIND_SERVICE.
24
+USER app
25
26
ENTRYPOINT ["dotnet", "Azure.DataApiBuilder.Service.dll"]
0 commit comments