Added config for Docker
This commit is contained in:
parent
cce375e78c
commit
018db043e7
2 changed files with 23 additions and 0 deletions
18
Bot_Discord_CSharp/Dockerfile.txt
Normal file
18
Bot_Discord_CSharp/Dockerfile.txt
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env
|
||||
WORKDIR /app
|
||||
|
||||
# Copy csproj and restore as distinct layers
|
||||
COPY *.csproj ./
|
||||
RUN dotnet restore
|
||||
|
||||
# Copy everything else and build
|
||||
COPY . ./
|
||||
RUN dotnet publish -c Release -o out
|
||||
|
||||
# Build runtime image
|
||||
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
|
||||
WORKDIR /app
|
||||
COPY --from=build-env /app/out .
|
||||
|
||||
#COPY config.json ./
|
||||
ENTRYPOINT ["dotnet", "Bot_Discord_CSharp.dll"]
|
||||
5
Bot_Discord_CSharp/docker-compose.yml
Normal file
5
Bot_Discord_CSharp/docker-compose.yml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
version: "3"
|
||||
services:
|
||||
bot:
|
||||
build: .
|
||||
image: mydiscordbot
|
||||
Loading…
Add table
Add a link
Reference in a new issue