Skip to content

Commit fc03b38

Browse files
committed
Run container as nonroot
Signed-off-by: Gregory May <[email protected]>
1 parent 8b1c23e commit fc03b38

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

template/powershell-http/Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,17 @@ COPY server.ps1 server.ps1
99

1010
COPY function function
1111

12-
HEALTHCHECK --interval=1s CMD [ -e /tmp/.lock ] || exit 1
12+
RUN adduser --system --no-create-home --uid 10001 app
13+
14+
USER 10001
1315

1416
ENV fprocess="pwsh ./server.ps1"
1517
ENV cgi_headers="true"
1618
ENV mode="http"
1719
ENV upstream_url="http://127.0.0.1:8082"
1820

1921
EXPOSE 8080
22+
23+
HEALTHCHECK --interval=1s CMD [ -e /tmp/.lock ] || exit 1
24+
2025
CMD ["fwatchdog"]

0 commit comments

Comments
 (0)