Add docker files
This commit is contained in:
parent
1b8787547e
commit
2f551f4d4a
2 changed files with 27 additions and 0 deletions
20
Dockerfile
Normal file
20
Dockerfile
Normal file
|
@ -0,0 +1,20 @@
|
|||
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
|
||||
WORKDIR /app
|
||||
|
||||
COPY src/*.csproj ./
|
||||
|
||||
WORKDIR /app
|
||||
RUN dotnet restore
|
||||
|
||||
WORKDIR /app
|
||||
COPY src/. ./
|
||||
WORKDIR /app
|
||||
RUN dotnet publish -c Release -o out
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:7.0
|
||||
WORKDIR /app
|
||||
EXPOSE 5157/tcp
|
||||
ENV ASPNETCORE_URLS http://*:5157
|
||||
|
||||
COPY --from=build /app/out ./
|
||||
ENTRYPOINT ["dotnet", "Age.dll"]
|
7
docker-compose.yml
Normal file
7
docker-compose.yml
Normal file
|
@ -0,0 +1,7 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
api:
|
||||
build: .
|
||||
ports:
|
||||
- 5157:5157
|
Loading…
Reference in a new issue