Deploying ASP.Net Core apps in Docker Containers

Download Deploying ASP.Net Core apps in Docker Containers

Post on 21-Jan-2018

299 views

Category:

Software

3 download

TRANSCRIPT

1. Host OS - Hardware Hyper Visor Guest OS #2Guest OS #1 (Virtual Machine) Docker Daemon 2. App A Server Host OS Hypervisor Guest OS Guest OS Guest OS Bins/Lib s Bins/Lib s Bins/Lib s App A App B Server Host OS Docker Engine Bins/Libs Bins/Libs AppA AppA AppB AppB AppB AppB AppB AppB Containers are isolated, but share OS and, where appropriate, bins/libraries 3. ImageLayers.io 4. DOCKER_HOST Images CacheContainers RegistryClient Docker pull Docker daemon Docker run Docker API Dot Net Dot Net Dot Net Dot Net 5. docker build Registry DOCKER_HOST ImagesContainers 0001Program.cs110 HelloWorld.dll 111010111011011010 Code/Binaries Client Docker build Docker daemon FROM microsoft/dotnet:1.0.0-rc2-core WORKDIR /app COPY /app /app ENTRYPOINT dotnet HelloWorld.dll dockerfile Private Registry Docker run Docker push 6. Docker Compose Private Registry Multi Service API Multi Service DOCKER_HOST ImagesContainers Registry Client Docker-compose Docker daemon version: '2' services: multiservice: image: - multiservice:latest environment: - CustomerAPIService=http://webapi/api/Customer ports: - "80:80" depends_on: - webapi webapi: image: - multiserviceapi:latest Docker-compose.yml Dot Net Multi Service Multi Service API front end api Multi Service Multi Service API 7. Host OS Networking DOCKER_HOST Container1 Docker daemon docker0: 192.168.1.100 :80 :8001 :8002 :8003 eth0: 172.17.0.2 Container2 eth0: 172.17.0.3 Container3 eth0: 172.17.0.4 Container4 eth0: 172.17.0.5 eth0: 10.100.2.100 veth5998974veth473629a veth2726149bveth736321c Docker Networking uses NAT to route inbound traffic to each container Each container can use the same port, internal to its container, but must be addressable outside by unique ports per HOST Load Balancers and Service Discovery are new important topics Note: networking may vary based on your orchestration engine