Add Windows 1809 support
This commit is contained in:
parent
59ec1dfc7d
commit
6dfc628088
48
docker-compose-windows-1809.yml
Normal file
48
docker-compose-windows-1809.yml
Normal 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
|
49
docker-stack-windows-1809.yml
Normal file
49
docker-stack-windows-1809.yml
Normal 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:
|
16
result/dotnet/Dockerfile.1809
Normal file
16
result/dotnet/Dockerfile.1809
Normal 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 .
|
16
vote/dotnet/Dockerfile.1809
Normal file
16
vote/dotnet/Dockerfile.1809
Normal 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 .
|
16
worker/dotnet/Dockerfile.1809
Normal file
16
worker/dotnet/Dockerfile.1809
Normal 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 .
|
Loading…
Reference in New Issue
Block a user