summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorSerghei Cebotari <serghei@cebotari.ru>2024-01-14 15:25:12 +0300
committerSerghei Cebotari <serghei@cebotari.ru>2024-01-14 15:25:12 +0300
commit3b3c1c1e2980545c557ce0b72e8d9543a18e5ae3 (patch)
treea7d3a8558a44b6e97db4c29379f76c6baaf553ee /Dockerfile
parent722a394d03773f966836a96884ee9e99e26bd780 (diff)
Move to chiseled dotnet docker image
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile15
1 files changed, 7 insertions, 8 deletions
diff --git a/Dockerfile b/Dockerfile
index 3b8aef5..f7b3a03 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,12 +1,11 @@
-FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
-WORKDIR /app
-
-COPY . ./
-RUN dotnet publish -c Release -o out
+FROM mcr.microsoft.com/dotnet/sdk:8.0-jammy AS build
+WORKDIR /source
+COPY . .
+RUN dotnet publish -o /app
-FROM mcr.microsoft.com/dotnet/aspnet:8.0
+FROM mcr.microsoft.com/dotnet/aspnet:8.0-jammy-chiseled
EXPOSE 5000
WORKDIR /app
-COPY --from=build /app/out .
+COPY --from=build /app .
ENV ASPNETCORE_ENVIRONMENT Production
-ENTRYPOINT [ "dotnet", "RhSolutions.Api.dll", "--urls=http://0.0.0.0:5000" ] \ No newline at end of file
+ENTRYPOINT ["./RhSolutions.Api", "--urls=http://0.0.0.0:5000"] \ No newline at end of file