Add Windows 1809 support

This commit is contained in:
Elton Stoneman 2018-10-22 11:27:04 +01:00
parent 59ec1dfc7d
commit 6dfc628088
5 changed files with 145 additions and 0 deletions

View File

@ -0,0 +1,48 @@
version: "3.2"
services:
vote:
image: dockersamples/examplevotingapp_vote:dotnet-nanoserver-1809
build:
context: ./vote/dotnet
dockerfile: Dockerfile.1809
ports:
- "5000:80"
depends_on:
- message-queue
result:
image: dockersamples/examplevotingapp_result:dotnet-nanoserver-1809
build:
context: ./result/dotnet
dockerfile: Dockerfile.1809
ports:
- "5001:80"
environment:
- "ConnectionStrings:ResultData=Server=db;Port=4000;Database=votes;User=root;SslMode=None"
depends_on:
- db
worker:
image: dockersamples/examplevotingapp_worker:dotnet-nanoserver-1809
build:
context: ./worker/dotnet
dockerfile: Dockerfile.1809
environment:
- "ConnectionStrings:VoteData=Server=db;Port=4000;Database=votes;User=root;SslMode=None"
depends_on:
- message-queue
- db
message-queue:
image: dockersamples/nats:nanoserver-1809
db:
image: dockersamples/tidb:nanoserver-1809
ports:
- "3306:4000"
networks:
default:
external:
name: nat

View File

@ -0,0 +1,49 @@
version: "3.2"
services:
vote:
image: dockersamples/examplevotingapp_vote:dotnet-nanoserver-1809
ports:
- "5000:80"
deploy:
mode: replicated
replicas: 4
networks:
- frontend
- backend
result:
image: dockersamples/examplevotingapp_result:dotnet-nanoserver-1809
environment:
- "ConnectionStrings:ResultData=Server=db;Port=4000;Database=votes;User=root;SslMode=None"
ports:
- "5001:80"
networks:
- frontend
- backend
worker:
image: dockersamples/examplevotingapp_worker:dotnet-nanoserver-1809
environment:
- "ConnectionStrings:VoteData=Server=db;Port=4000;Database=votes;User=root;SslMode=None"
deploy:
mode: replicated
replicas: 3
networks:
- backend
message-queue:
image: dockersamples/nats:nanoserver-1809
networks:
- backend
db:
image: dockersamples/tidb:nanoserver-1809
ports:
- "3306:4000"
networks:
- backend
networks:
frontend:
backend:

View File

@ -0,0 +1,16 @@
FROM microsoft/dotnet:2.1-sdk-nanoserver-1809 as builder
WORKDIR /Result
COPY Result/Result.csproj .
RUN dotnet restore
COPY /Result .
RUN dotnet publish -c Release -o /out Result.csproj
# app image
FROM microsoft/dotnet:2.1-aspnetcore-runtime-nanoserver-1809
WORKDIR /app
ENTRYPOINT ["dotnet", "Result.dll"]
COPY --from=builder /out .

View File

@ -0,0 +1,16 @@
FROM microsoft/dotnet:2.1-sdk-nanoserver-1809 as builder
WORKDIR /Vote
COPY Vote/Vote.csproj .
RUN dotnet restore
COPY /Vote .
RUN dotnet publish -c Release -o /out Vote.csproj
# app image
FROM microsoft/dotnet:2.1-aspnetcore-runtime-nanoserver-1809
WORKDIR /app
ENTRYPOINT ["dotnet", "Vote.dll"]
COPY --from=builder /out .

View File

@ -0,0 +1,16 @@
FROM microsoft/dotnet:2.1-sdk-nanoserver-1809 as builder
WORKDIR /Worker
COPY Worker/Worker.csproj .
RUN dotnet restore
COPY /Worker .
RUN dotnet publish -c Release -o /out Worker.csproj
# app image
FROM microsoft/dotnet:2.1-aspnetcore-runtime-nanoserver-1809
WORKDIR /app
ENTRYPOINT ["dotnet", "Worker.dll"]
COPY --from=builder /out .