Add Docker
This commit is contained in:
25
src/.dockerignore
Normal file
25
src/.dockerignore
Normal file
@@ -0,0 +1,25 @@
|
||||
**/.classpath
|
||||
**/.dockerignore
|
||||
**/.env
|
||||
**/.git
|
||||
**/.gitignore
|
||||
**/.project
|
||||
**/.settings
|
||||
**/.toolstarget
|
||||
**/.vs
|
||||
**/.vscode
|
||||
**/*.*proj.user
|
||||
**/*.dbmdl
|
||||
**/*.jfm
|
||||
**/azds.yaml
|
||||
**/bin
|
||||
**/charts
|
||||
**/docker-compose*
|
||||
**/Dockerfile*
|
||||
**/node_modules
|
||||
**/npm-debug.log
|
||||
**/obj
|
||||
**/secrets.dev.yaml
|
||||
**/values.dev.yaml
|
||||
LICENSE
|
||||
README.md
|
||||
16
src/RestAPI/Dockerfile
Normal file
16
src/RestAPI/Dockerfile
Normal file
@@ -0,0 +1,16 @@
|
||||
FROM mcr.microsoft.com/dotnet/sdk:5.0.102-ca-patch-buster-slim AS build
|
||||
WORKDIR /app
|
||||
|
||||
COPY ["src/RestAPI/RestAPI.csproj", "src/RestAPI/"]
|
||||
RUN dotnet restore "src/RestAPI/RestAPI.csproj"
|
||||
COPY . .
|
||||
|
||||
WORKDIR ./src/RestAPI
|
||||
|
||||
RUN dotnet build "RestAPI.csproj" -c Release -o /app/build
|
||||
RUN dotnet publish "RestAPI.csproj" -c Release -o /app/publish
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:5.0
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/publish .
|
||||
ENTRYPOINT ["dotnet", "RestAPI.dll"]
|
||||
Reference in New Issue
Block a user