Skip to content

Commit e286400

Browse files
authored
Use unprivileged users in arm32v7 Dockerfile (#29)
1 parent 3fc86cc commit e286400

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

content/dotnet-template-azure-iot-edge-module/CSharp/Dockerfile.arm32v7

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,8 @@ RUN dotnet publish -c Release -o out
1010
FROM microsoft/dotnet:2.0-runtime-stretch-arm32v7
1111
WORKDIR /app
1212
COPY --from=build-env /app/out ./
13+
14+
RUN useradd -ms /bin/bash moduleuser
15+
USER moduleuser
16+
1317
ENTRYPOINT ["dotnet", "SampleModule.dll"]

content/dotnet-template-azure-iot-edge-module/FSharp/Dockerfile.arm32v7

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,8 @@ RUN dotnet publish -c Release -o out
1010
FROM microsoft/dotnet:2.0-runtime-stretch-arm32v7
1111
WORKDIR /app
1212
COPY --from=build-env /app/out ./
13+
14+
RUN useradd -ms /bin/bash moduleuser
15+
USER moduleuser
16+
1317
ENTRYPOINT ["dotnet", "SampleModule.dll"]

0 commit comments

Comments
 (0)