Run publisher container as user root
This commit is contained in:
Родитель
8a4f20f7b0
Коммит
ed86d12b54
|
@ -17,11 +17,7 @@ RUN dotnet publish -c Release -o out
|
|||
|
||||
# start it up
|
||||
FROM microsoft/dotnet:${runtime_base_tag} AS runtime
|
||||
# Add an unprivileged user account for running the module
|
||||
RUN adduser -s /bin/sh -D moduleuser
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/opcpublisher/out ./
|
||||
WORKDIR /appdata
|
||||
RUN chown -R moduleuser /appdata
|
||||
USER moduleuser
|
||||
ENTRYPOINT ["dotnet", "/app/opcpublisher.dll"]
|
|
@ -17,11 +17,7 @@ RUN dotnet publish -c Release -o out
|
|||
|
||||
# start it up
|
||||
FROM microsoft/dotnet:${runtime_base_tag} AS runtime
|
||||
# Add an unprivileged user account for running the module
|
||||
RUN adduser -s /bin/sh -D moduleuser
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/opcpublisher/out ./
|
||||
WORKDIR /appdata
|
||||
RUN chown -R moduleuser /appdata
|
||||
USER moduleuser
|
||||
ENTRYPOINT ["dotnet", "/app/opcpublisher.dll"]
|
|
@ -22,14 +22,9 @@ RUN apt-get update && \
|
|||
apt-get install -y --no-install-recommends unzip procps && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Add an unprivileged user account for running the module
|
||||
RUN useradd -s /bin/sh moduleuser
|
||||
|
||||
RUN curl -sSL https://aka.ms/getvsdbgsh | bash /dev/stdin -v latest -l ~/vsdbg
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/opcpublisher/out ./
|
||||
WORKDIR /appdata
|
||||
RUN chown -R moduleuser /appdata
|
||||
USER moduleuser
|
||||
ENTRYPOINT ["dotnet", "/app/opcpublisher.dll"]
|
|
@ -17,11 +17,7 @@ RUN dotnet publish -c Release -o out
|
|||
|
||||
# start it up
|
||||
FROM microsoft/dotnet:${runtime_base_tag} AS runtime
|
||||
# Add an unprivileged user account for running the module
|
||||
RUN useradd -s /bin/sh moduleuser
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/opcpublisher/out ./
|
||||
WORKDIR /appdata
|
||||
RUN chown -R moduleuser /appdata
|
||||
USER moduleuser
|
||||
ENTRYPOINT ["dotnet", "/app/opcpublisher.dll"]
|
Загрузка…
Ссылка в новой задаче