Skip to content

Commit d77d281

Browse files
committed
added docker file for sample echo server
1 parent 140fe6a commit d77d281

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

.dockerignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
bin
2+
obj

samples/EchoServer/Dockerfile

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
2+
WORKDIR /app
3+
4+
COPY . ./
5+
WORKDIR /app/samples/EchoServer
6+
7+
RUN dotnet publish -c Release -o /app/out -f net8.0
8+
9+
10+
# Build runtime image
11+
FROM mcr.microsoft.com/dotnet/aspnet:8.0
12+
13+
WORKDIR /app
14+
COPY --from=build-env /app/out .
15+
16+
ENV ASPNETCORE_URLS http://*:5000
17+
ENTRYPOINT ["dotnet", "EchoServer.dll"]

0 commit comments

Comments
 (0)