Skip to content

Commit 3d1f0e1

Browse files
authored
add nonroot user creation
1 parent 54fb7fa commit 3d1f0e1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

CoreWebApiTest/Dockerfile

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Build runtime image
22
FROM microsoft/aspnetcore:2.0
3+
ENV ASPNETCORE_URLS=http://+:8080
4+
RUN useradd --create-home -s /bin/bash svcwebuser
35
WORKDIR /app
4-
COPY publish/ .
6+
USER svcwebuser
7+
COPY publish/* ./
58
ENTRYPOINT ["dotnet", "CoreWebApiTest.dll"]

0 commit comments

Comments
 (0)