Spaces:
Runtime error
Runtime error
Florin Bobiș
commited on
Commit
•
b944c8a
1
Parent(s):
20014ca
initial Docker
Browse files- Dockerfile +16 -0
Dockerfile
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
|
2 |
+
# current folder
|
3 |
+
WORKDIR /
|
4 |
+
|
5 |
+
# Copy everything
|
6 |
+
COPY . ./
|
7 |
+
# Restore as distinct layers
|
8 |
+
RUN dotnet restore
|
9 |
+
# Build and publish a release
|
10 |
+
RUN dotnet publish -c Release -o out
|
11 |
+
|
12 |
+
# Build runtime image
|
13 |
+
FROM mcr.microsoft.com/dotnet/aspnet:8.0
|
14 |
+
WORKDIR /
|
15 |
+
COPY --from=build-env /out .
|
16 |
+
ENTRYPOINT ["dotnet", "QuotesAPI.dll"]
|