Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Deep dive in Windows Server Containers en Docker

Deep dive in Windows Server Containers en Docker

devNetNoord 12, sessie 2

devNetNoord

March 23, 2017
Tweet

More Decks by devNetNoord

Other Decks in Technology

Transcript

  1. The cloud has changed expectations Availability 100% Uptime Hyper-scale From

    startup to enterprise Agility Deliver just in time speed
  2. REST Interface libcontainerd graph libnetwork plugins Control Groups Job objects

    Namespaces Object Namespace, Process Table, Networking Layer Capabilities Registry, Union like filesystem extensions Other OS Functionality Compute Service Docker Client Docker Registry Docker Compose Docker Swarm Architecture
  3. Windows Server Containers Host User Mode Container Management System Processes

    Application Processes System Processes System Processes Application Processes
  4. Hyper-V Containers Host User Mode Virtual Machine Specifically Optimized To

    Run a Container Container Management System Processes System Processes Application Processes
  5. Service Bus Bounded Contexts Payment … Classic … Classic Adapter

    Event Handler Salesforce … … SalesForce Adapter Reporting External Authentication Microservices
  6. Hmm, a docker run overload docker run ApplicationA docker run

    ApplicationB docker run ApplicationC docker run ApplicationF docker run ApplicationD docker run ApplicationE docker run ApplicationG docker run ApplicationH docker run ApplicationM docker run ApplicationL docker run ApplicationI docker run ApplicationK docker run ApplicationJ docker run ApplicationN
  7. Docker compose version: '2' services: dotnedsaturdaydata: build: context: ./src/DotNedSaturday.Data/ dockerfile:

    Dockerfile ports: - "53000:53000" dotnedsaturdaydemo: build: context: ./src/DotNedSaturday.Demo/ dockerfile: Dockerfile depends_on: - "dotnedsaturdaydata" ports: - "80:54000" networks: default: external: name: nat
  8. Hyper-V Windows Server Container Windows Container Implementations Windows Container Hosts

    1. Commit 3. Docker build 2. Build trigger 4. Docker push microsoft/windowsservercore Container Base Images microsoft/nanoserver 1. docker pull 2. docker run Docker Engine Docker registries docker-compose run Docker Swarm Docker Hub Container Images Azure Container Service (ACS) Putting it all together...
  9. Keep windows images up-to-date (http://bit.ly/2kdVIHr) What we learned... No containers

    running and filesystem full? (docker ps -a) Data volume containers (docker create -v C:/DockerData:C:/data --name DataContainer microsoft/windowsservercore docker run -it -d --volumes-from DataContainer --name Consumer1 microsoft/windowsservercore) ENV vs ARG Order of layers (new layer can mean a rebuild) Exec and shell form of running scripts (Shell: CMD executable param1 param2, EXEC: CMD ["executable","param1","param2"]) Registries (internal vs cloud?) Be aware of sensitive information!
  10. Tips & tricks Portainer (http://portainer.io/overview.html#demo ) Install-Module Image2Docker Import-Module Image2Docker

    ConvertTo-Dockerfile -ImagePathC:\win-2016-iis.vhd -Artifact IIS - OutputPathc:\i2d2\iis Ctrl+P+Q (step out the container prompt) DockerTLS (docker run --rm -e IP_ADDRESSES=127.0.0.1,192.168.254.123 -v "C:\ProgramData\docker:C:\ProgramData\docker" -v "$env:USERPROFILE\.docker:C:\Users\ContainerAdmi nistrator\.docker" stefanscherer/dockertls-windows) Group Managed Service Accounts (https://github.com/Microsoft/Virtualizat ion-Documentation/tree/live/windows- server-container-tools/ServiceAccountss) Be aware of vulnerabilities!