Skip to content

Commit 9b600cb

Browse files
committed
change to dockerFile
Signed-off-by: Neil South <[email protected]>
1 parent 09c409f commit 9b600cb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ RUN dotnet publish -c Release -o out --nologo src/InformaticsGateway/Monai.Deplo
2727

2828
# Build runtime image
2929
FROM mcr.microsoft.com/dotnet/aspnet:8.0-jammy
30+
RUN adduser --system --group --no-create-home appuser
3031

3132
# Enable elastic client compatibility mode
3233
ENV ELASTIC_CLIENT_APIVERSIONING=true
@@ -42,6 +43,8 @@ RUN apt-get clean \
4243

4344
WORKDIR /opt/monai/ig
4445

46+
RUN chown -R appuser:appuser /opt/monai/ig
47+
4548
COPY --from=build /app/out .
4649
COPY --from=build /tools /opt/dotnetcore-tools
4750
COPY LICENSE ./
@@ -58,4 +61,6 @@ HEALTHCHECK --interval=10s --retries=10 CMD curl --fail http://localhost:5000/he
5861
RUN ls -lR /opt/monai/ig
5962
ENV PATH="/opt/dotnetcore-tools:${PATH}"
6063

64+
USER appuser
65+
6166
ENTRYPOINT ["/opt/monai/ig/Monai.Deploy.InformaticsGateway"]

0 commit comments

Comments
 (0)