Skip to content

Commit

Permalink
added docker file for sample echo server
Browse files Browse the repository at this point in the history
  • Loading branch information
kerryjiang committed Sep 15, 2024
1 parent 140fe6a commit d77d281
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bin
obj
17 changes: 17 additions & 0 deletions samples/EchoServer/Dockerfile
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"]

0 comments on commit d77d281

Please sign in to comment.