-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added docker file for sample echo server
- Loading branch information
1 parent
140fe6a
commit d77d281
Showing
2 changed files
with
19 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,2 @@ | ||
bin | ||
obj |
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,17 @@ | ||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env | ||
WORKDIR /app | ||
|
||
COPY . ./ | ||
WORKDIR /app/samples/EchoServer | ||
|
||
RUN dotnet publish -c Release -o /app/out -f net8.0 | ||
|
||
|
||
# Build runtime image | ||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 | ||
|
||
WORKDIR /app | ||
COPY --from=build-env /app/out . | ||
|
||
ENV ASPNETCORE_URLS http://*:5000 | ||
ENTRYPOINT ["dotnet", "EchoServer.dll"] |