-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added dockerfile for running the bot
- Loading branch information
1 parent
3050e98
commit 7ae85d2
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.git | ||
.gitignore | ||
.env | ||
LICENSE | ||
README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM mcr.microsoft.com/dotnet/core/sdk:2.2-alpine AS build | ||
WORKDIR /app | ||
|
||
# copy csproj and restore as distinct layers | ||
COPY *.csproj ./image-search-bot/ | ||
WORKDIR /app/image-search-bot | ||
RUN dotnet restore | ||
|
||
# copy and publish app and libraries | ||
WORKDIR /app/ | ||
COPY ./ ./image-search-bot/ | ||
WORKDIR /app/image-search-bot | ||
RUN dotnet publish -c Release -o out | ||
|
||
# run application | ||
FROM mcr.microsoft.com/dotnet/core/runtime:2.2-alpine AS runtime | ||
WORKDIR /app | ||
COPY --from=build /app/image-search-bot/out ./ | ||
CMD dotnet image-search-bot.dll |