Refactored Dockerfile
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final
|
||||
WORKDIR /app
|
||||
|
||||
COPY ./SampleApi/bin/Release/net8.0/publish/ .
|
||||
USER app
|
||||
|
||||
COPY --chown=app:app ./SampleApi/bin/Release/net8.0/publish/ .
|
||||
|
||||
ENV ASPNETCORE_HTTP_PORTS=8081
|
||||
EXPOSE 8081
|
||||
ENV ASPNETCORE_HTTP_PORTS=8081
|
||||
|
||||
WORKDIR /app
|
||||
ENTRYPOINT ["dotnet", "SampleApi.dll"]
|
||||
Reference in New Issue
Block a user