Pro Yearly is on sale from $80 to $50! »

Docker Webinar

Docker Webinar

Slides from my Docker Webinar on July 8th 2020

6848c06ef647ab606c668cc5264c0fc9?s=128

Thorsten Hans

July 08, 2020
Tweet

Transcript

  1. Docker Für .NET Entwickler Thorsten Hans @ThorstenHans Consultant

  2. Focus: Cloud Native & Infrastructure as Code Consultant @ Thinktecture

    AG thorsten.hans@thinktecture.com thorsten.hans@gmail.com thinktecture.com thorsten-hans.com @ThorstenHans Thorsten Hans
  3. Talking Points What is Docker Working with Docker CLI Working

    with containerized Apps Common Docker Tasks
  4. A Quick Introduction • Container Runtime • Written in Go

    • Available for Windows, Linux, macOS • Most parts are Open Source • Can be leveraged at each point of software lifecycle • Develop, Test, Deploy, Operate What Is Docker
  5. Architecture What Is Docker Docker Engine Docker Client Docker Daemon

  6. Building Blocks • Containers are executed by Docker • Images

    are read-only artefacts that Docker creates • Dockerfile is the blueprint for building an Image • Tag is a (human readable) reference to a specific Image • Registry is a centralized public or private repository where Images are stored What Is Docker
  7. Architecture Docker provides a container format called libcontainer which consists

    of three essential building blocks: • namespaces: Provide isolation for things like processes, network, filesystem • Control Groups: Used on Linux to limit resources for Containers • Union File System: Layered File System to create Images from reusable, small blocks What Is Docker
  8. A layered approach Union File System

  9. Talking Points What is Docker Working with Docker CLI Working

    with containerized Apps Common Docker Tasks
  10. Run your first Docker Container docker run -it --rm ubuntu:latest

    bash
  11. Run a Web- Server in Docker docker run -d nginx:latest

  12. Run a Web- Server in Docker docker run –d –p

    8080:80 nginx:latest
  13. List Containers docker ps

  14. List all Containers docker ps -a

  15. Stop a Container docker stop <<CONTAINER>>

  16. Remove a Container docker rm <<CONTAINER>>

  17. Remove a running Container docker rm -f <<CONTAINER>>

  18. Talking Points What is Docker Working with Docker CLI Working

    with containerized Apps Common Docker Tasks
  19. Building Docker Images • Dockerfile acts as blueprint for the

    Docker Image • Use .dockerignore to ignore certain files/folders • Microsoft offers great Base-Images for .NET applications • Try to make your Images as small as possible Working with containerized Apps
  20. Demo Containerizing a .NET Application

  21. Build an application Image docker build . -t thorstenhans/webinar-api:0.0.1

  22. Publish an application Image docker push thorstenhans/webinar-api:0.0.1

  23. Pull an application Image docker pull thorstenhans/webinar-api:0.0.1

  24. List all local Images docker image ls

  25. Remove an Image docker image rm <<IMAGE>>

  26. Create a Network docker network create –d bridge my-dev-net

  27. Run Container in a Network docker run –d --name web

    --network my-dev-net nginx:latest
  28. Inspect a Docker Network docker network inspect my-dev-net

  29. Talking Points What is Docker Working with Docker CLI Working

    with containerized Apps Common Docker Tasks
  30. Get Logs from a Container docker logs <<CONTAINER>>

  31. Get Container stats docker stats # or use open-source tool

    cTOP ctop
  32. Create an Image from a Container docker commit <<CONTAINER>> <<IMAGE>>

  33. Inspect port forwardings docker port <<CONTAINER>>

  34. Inspect Filesystem Diffs docker diff <<CONTAINER>>

  35. Inspect a Docker object docker inspect <<OBJECT>>

  36. Q&A If you have further questions: shoot me a mail

    at thorsten.hans@thinktecture.com / thorsten.hans@gmail.com or tweet at @ThorstenHans