mirror of
https://github.com/fergalmoran/retns-api.git
synced 2025-12-22 10:00:54 +00:00
16 lines
351 B
Docker
16 lines
351 B
Docker
FROM microsoft/dotnet:sdk AS build-env
|
|
WORKDIR /app
|
|
EXPOSE 5000
|
|
|
|
# copy csproj and restore as distinct layers
|
|
COPY *.csproj ./
|
|
RUN dotnet restore
|
|
|
|
COPY . ./
|
|
RUN dotnet publish -c Release -o out
|
|
|
|
# spin up the runtime
|
|
FROM microsoft/dotnet:aspnetcore-runtime
|
|
WORKDIR /app
|
|
COPY --from=build-env /app/out .
|
|
ENTRYPOINT ["dotnet", "retns.homework.api.dll"] |