From f9001262a8bbe1f072e78bf5677b056711a994c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Fri, 24 Oct 2025 15:24:23 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=A9=E2=80=8D=F0=9F=8F=AB=20Docker=20Wo?= =?UTF-8?q?rkshop=20(PyLadies=20x=20Empowered=20In=20Tech)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- slides/_redirects | 1 + .../Building_Images_With_Dockerfiles.md | 132 ++----------- slides/containers/Cmd_And_Entrypoint.md | 28 ++- slides/containers/Compose_For_Dev_Stacks.md | 36 ++-- .../containers/Container_Networking_Basics.md | 4 + slides/containers/Dockerfile_Tips.md | 94 +--------- slides/containers/Initial_Images.md | 71 +------ .../containers/Local_Development_Workflow.md | 75 -------- .../More_Dockerfile_Instructions.md | 140 ++++++++++++++ slides/containers/Multi_Stage_Builds.md | 157 +--------------- slides/{intro-fullday.yml => docker.yml} | 54 ++---- slides/intro-selfpaced.yml | 77 -------- slides/intro-twodays.yml | 84 --------- slides/kadm-fullday.yml | 65 ------- slides/kadm-twodays.yml | 96 ---------- slides/kube-adv.yml | 94 ---------- slides/kube-fullday.yml | 137 -------------- slides/kube-halfday.yml | 91 --------- slides/kube-selfpaced.yml | 176 ------------------ slides/kube-twodays.yml | 137 -------------- slides/logistics-pyladies.md | 59 ++++++ slides/logistics.md | 2 +- slides/swarm-fullday.yml | 72 ------- slides/swarm-halfday.yml | 71 ------- slides/swarm-selfpaced.yml | 80 -------- slides/swarm-video.yml | 75 -------- 26 files changed, 292 insertions(+), 1816 deletions(-) create mode 100644 slides/containers/More_Dockerfile_Instructions.md rename slides/{intro-fullday.yml => docker.yml} (53%) delete mode 100644 slides/intro-selfpaced.yml delete mode 100644 slides/intro-twodays.yml delete mode 100644 slides/kadm-fullday.yml delete mode 100644 slides/kadm-twodays.yml delete mode 100644 slides/kube-adv.yml delete mode 100644 slides/kube-fullday.yml delete mode 100644 slides/kube-halfday.yml delete mode 100644 slides/kube-selfpaced.yml delete mode 100644 slides/kube-twodays.yml create mode 100644 slides/logistics-pyladies.md delete mode 100644 slides/swarm-fullday.yml delete mode 100644 slides/swarm-halfday.yml delete mode 100644 slides/swarm-selfpaced.yml delete mode 100644 slides/swarm-video.yml diff --git a/slides/_redirects b/slides/_redirects index 68a7c0ca..40989a99 100644 --- a/slides/_redirects +++ b/slides/_redirects @@ -2,6 +2,7 @@ #/ /kube-halfday.yml.html 200! #/ /kube-fullday.yml.html 200! #/ /kube-twodays.yml.html 200! +/ /docker.yml.html 200! # And this allows to do "git clone https://container.training". /info/refs service=git-upload-pack https://github.com/jpetazzo/container.training/info/refs?service=git-upload-pack diff --git a/slides/containers/Building_Images_With_Dockerfiles.md b/slides/containers/Building_Images_With_Dockerfiles.md index e428aaaa..38acaece 100644 --- a/slides/containers/Building_Images_With_Dockerfiles.md +++ b/slides/containers/Building_Images_With_Dockerfiles.md @@ -87,119 +87,7 @@ To keep things simple for now: this is the directory where our Dockerfile is loc --- -## What happens when we build the image? - -It depends if we're using BuildKit or not! - -If there are lots of blue lines and the first line looks like this: -``` -[+] Building 1.8s (4/6) -``` -... then we're using BuildKit. - -If the output is mostly black-and-white and the first line looks like this: -``` -Sending build context to Docker daemon 2.048kB -``` -... then we're using the "classic" or "old-style" builder. - ---- - -## To BuildKit or Not To BuildKit - -Classic builder: - -- copies the whole "build context" to the Docker Engine - -- linear (processes lines one after the other) - -- requires a full Docker Engine - -BuildKit: - -- only transfers parts of the "build context" when needed - -- will parallelize operations (when possible) - -- can run in non-privileged containers (e.g. on Kubernetes) - ---- - -## With the classic builder - -The output of `docker build` looks like this: - -.small[ -```bash -docker build -t figlet . -Sending build context to Docker daemon 2.048kB -Step 1/3 : FROM ubuntu - ---> f975c5035748 -Step 2/3 : RUN apt-get update - ---> Running in e01b294dbffd -(...output of the RUN command...) -Removing intermediate container e01b294dbffd - ---> eb8d9b561b37 -Step 3/3 : RUN apt-get install figlet - ---> Running in c29230d70f9b -(...output of the RUN command...) -Removing intermediate container c29230d70f9b - ---> 0dfd7a253f21 -Successfully built 0dfd7a253f21 -Successfully tagged figlet:latest -``` -] - -* The output of the `RUN` commands has been omitted. -* Let's explain what this output means. - ---- - -## Sending the build context to Docker - -```bash -Sending build context to Docker daemon 2.048 kB -``` - -* The build context is the `.` directory given to `docker build`. - -* It is sent (as an archive) by the Docker client to the Docker daemon. - -* This allows to use a remote machine to build using local files. - -* Be careful (or patient) if that directory is big and your link is slow. - -* You can speed up the process with a [`.dockerignore`](https://docs.docker.com/engine/reference/builder/#dockerignore-file) file - - * It tells docker to ignore specific files in the directory - - * Only ignore files that you won't need in the build context! - ---- - -## Executing each step - -```bash -Step 2/3 : RUN apt-get update - ---> Running in e01b294dbffd -(...output of the RUN command...) -Removing intermediate container e01b294dbffd - ---> eb8d9b561b37 -``` - -* A container (`e01b294dbffd`) is created from the base image. - -* The `RUN` command is executed in this container. - -* The container is committed into an image (`eb8d9b561b37`). - -* The build container (`e01b294dbffd`) is removed. - -* The output of this step will be the base image for the next one. - ---- - -## With BuildKit +## Build output .small[ ```bash @@ -231,7 +119,7 @@ Removing intermediate container e01b294dbffd --- -## Understanding BuildKit output +## Understanding builder output - BuildKit transfers the Dockerfile and the *build context* @@ -249,9 +137,9 @@ Removing intermediate container e01b294dbffd class: extra-details -## BuildKit plain output +## Builder plain output -- When running BuildKit in e.g. a CI pipeline, its output will be different +- When running builds in e.g. a CI pipeline, its output will be different - We can see the same output format by using `--progress=plain` @@ -360,6 +248,8 @@ class: extra-details --- +class: extra-details + ## Shell syntax vs exec syntax Dockerfile commands that execute something can have two forms: @@ -374,6 +264,8 @@ We are going to change our Dockerfile to see how it affects the resulting image. --- +class: extra-details + ## Using exec syntax in our Dockerfile Let's change our Dockerfile as follows! @@ -392,6 +284,8 @@ $ docker build -t figlet . --- +class: extra-details + ## History with exec syntax Compare the new history: @@ -413,6 +307,8 @@ IMAGE CREATED CREATED BY SIZE --- +class: extra-details + ## When to use exec syntax and shell syntax * shell syntax: @@ -431,6 +327,8 @@ IMAGE CREATED CREATED BY SIZE --- +class: extra-details + ## Pro-tip: the `exec` shell built-in POSIX shells have a built-in command named `exec`. @@ -447,6 +345,8 @@ From a user perspective: --- +class: extra-details + ## Example using `exec` ```dockerfile diff --git a/slides/containers/Cmd_And_Entrypoint.md b/slides/containers/Cmd_And_Entrypoint.md index 1128127a..b5cc0d06 100644 --- a/slides/containers/Cmd_And_Entrypoint.md +++ b/slides/containers/Cmd_And_Entrypoint.md @@ -42,7 +42,7 @@ Our new Dockerfile will look like this: ```dockerfile FROM ubuntu RUN apt-get update -RUN ["apt-get", "install", "figlet"] +RUN apt-get install figlet CMD figlet -f script hello ``` @@ -96,6 +96,8 @@ root@7ac86a641116:/# --- +class: extra-details + ## Using `ENTRYPOINT` We want to be able to specify a different message on the command line, @@ -117,6 +119,8 @@ We will use the `ENTRYPOINT` verb in Dockerfile. --- +class: extra-details + ## Adding `ENTRYPOINT` to our Dockerfile Our new Dockerfile will look like this: @@ -124,7 +128,7 @@ Our new Dockerfile will look like this: ```dockerfile FROM ubuntu RUN apt-get update -RUN ["apt-get", "install", "figlet"] +RUN apt-get install figlet ENTRYPOINT ["figlet", "-f", "script"] ``` @@ -138,6 +142,8 @@ Why did we use JSON syntax for our `ENTRYPOINT`? --- +class: extra-details + ## Implications of JSON vs string syntax * When CMD or ENTRYPOINT use string syntax, they get wrapped in `sh -c`. @@ -158,6 +164,8 @@ sh -c "figlet -f script" salut --- +class: extra-details + ## Build and test our image Let's build it: @@ -182,6 +190,8 @@ $ docker run figlet salut --- +class: extra-details + ## Using `CMD` and `ENTRYPOINT` together What if we want to define a default message for our container? @@ -196,6 +206,8 @@ Then we will use `ENTRYPOINT` and `CMD` together. --- +class: extra-details + ## `CMD` and `ENTRYPOINT` together Our new Dockerfile will look like this: @@ -203,7 +215,7 @@ Our new Dockerfile will look like this: ```dockerfile FROM ubuntu RUN apt-get update -RUN ["apt-get", "install", "figlet"] +RUN apt-get install figlet ENTRYPOINT ["figlet", "-f", "script"] CMD ["hello world"] ``` @@ -217,6 +229,8 @@ CMD ["hello world"] --- +class: extra-details + ## Build and test our image Let's build it: @@ -241,6 +255,8 @@ $ docker run myfiglet --- +class: extra-details + ## Overriding the image default parameters Now let's pass extra arguments to the image. @@ -258,6 +274,8 @@ We overrode `CMD` but still used `ENTRYPOINT`. --- +class: extra-details + ## Overriding `ENTRYPOINT` What if we want to run a shell in our container? @@ -274,6 +292,8 @@ root@6027e44e2955:/# --- +class: extra-details + ## `CMD` and `ENTRYPOINT` recap - `docker run myimage` executes `ENTRYPOINT` + `CMD` @@ -297,6 +317,8 @@ root@6027e44e2955:/# --- +class: extra-details + ## When to use `ENTRYPOINT` vs `CMD` `ENTRYPOINT` is great for "containerized binaries". diff --git a/slides/containers/Compose_For_Dev_Stacks.md b/slides/containers/Compose_For_Dev_Stacks.md index 23c74928..0bf5cf65 100644 --- a/slides/containers/Compose_For_Dev_Stacks.md +++ b/slides/containers/Compose_For_Dev_Stacks.md @@ -278,6 +278,8 @@ For the full list, check: https://docs.docker.com/compose/compose-file/ --- +class: extra-details + ## Running multiple copies of a stack - Copy the stack in two different directories, e.g. `front` and `frontcopy` @@ -353,6 +355,8 @@ Use `docker compose down -v` to remove everything including volumes. --- +class: extra-details + ## Special handling of volumes - When an image gets updated, Compose automatically creates a new container @@ -371,6 +375,8 @@ Use `docker compose down -v` to remove everything including volumes. --- +class: extra-details + ## Gotchas with volumes - Unfortunately, Docker volumes don't have labels or metadata @@ -391,6 +397,8 @@ Use `docker compose down -v` to remove everything including volumes. --- +class: extra-details + ## Managing volumes explicitly Option 1: *named volumes* @@ -412,6 +420,8 @@ volumes: --- +class: extra-details + ## Managing volumes explicitly Option 2: *relative paths* @@ -431,6 +441,8 @@ services: --- +class: extra-details + ## Managing complex stacks - Compose provides multiple features to manage complex stacks @@ -453,6 +465,8 @@ services: --- +class: extra-details + ## Dependencies - A service can have a `depends_on` section @@ -465,28 +479,6 @@ services: ⚠️ It doesn't make a service "wait" for another one to be up! ---- - -class: extra-details - -## A bit of history and trivia - -- Compose was initially named "Fig" - -- Compose is one of the only components of Docker written in Python - - (almost everything else is in Go) - -- In 2020, Docker introduced "Compose CLI": - - - `docker compose` command to deploy Compose stacks to some clouds - - - in Go instead of Python - - - progressively getting feature parity with `docker compose` - - - also provides numerous improvements (e.g. leverages BuildKit by default) - ??? :EN:- Using compose to describe an environment diff --git a/slides/containers/Container_Networking_Basics.md b/slides/containers/Container_Networking_Basics.md index 78dbaf4f..4869cb0e 100644 --- a/slides/containers/Container_Networking_Basics.md +++ b/slides/containers/Container_Networking_Basics.md @@ -235,6 +235,8 @@ communication across hosts, and publishing/load balancing for inbound traffic. --- +class: extra-details + ## Finding the container's IP address We can use the `docker inspect` command to find the IP address of the @@ -253,6 +255,8 @@ $ docker inspect --format '{{ .NetworkSettings.IPAddress }}' --- +class: extra-details + ## Pinging our container Let's try to ping our container *from another container.* diff --git a/slides/containers/Dockerfile_Tips.md b/slides/containers/Dockerfile_Tips.md index 31a49499..2cc7d976 100644 --- a/slides/containers/Dockerfile_Tips.md +++ b/slides/containers/Dockerfile_Tips.md @@ -76,6 +76,8 @@ CMD ["python", "app.py"] --- +class: extra-details + ## Be careful with `chown`, `chmod`, `mv` * Layers cannot store efficiently changes in permissions or ownership. @@ -117,6 +119,8 @@ CMD ["python", "app.py"] --- +class: extra-details + ## Use `COPY --chown` * The Dockerfile instruction `COPY` can take a `--chown` parameter. @@ -140,6 +144,8 @@ CMD ["python", "app.py"] --- +class: extra-details + ## Set correct permissions locally * Instead of using `chmod`, set the right file permissions locally. @@ -148,29 +154,6 @@ CMD ["python", "app.py"] --- -## Embedding unit tests in the build process - -```dockerfile -FROM -RUN -COPY -RUN -RUN -COPY -RUN -FROM -RUN -COPY -RUN -CMD, EXPOSE ... -``` - -* The build fails as soon as an instruction fails -* If `RUN ` fails, the build doesn't produce an image -* If it succeeds, it produces a clean image (without test libraries and data) - ---- - # Dockerfile examples There are a number of tips, tricks, and techniques that we can use in Dockerfiles. @@ -286,6 +269,8 @@ ENV PIP=9.0.3 \ --- +class: extra-details + ## Entrypoints and wrappers It is very common to define a custom entrypoint. @@ -303,6 +288,8 @@ That entrypoint will generally be a script, performing any combination of: --- +class: extra-details + ## A typical entrypoint script ```dockerfile @@ -357,67 +344,6 @@ RUN ... --- -## Overrides - -In theory, development and production images should be the same. - -In practice, we often need to enable specific behaviors in development (e.g. debug statements). - -One way to reconcile both needs is to use Compose to enable these behaviors. - -Let's look at the [trainingwheels](https://github.com/jpetazzo/trainingwheels) demo app for an example. - ---- - -## Production image - -This Dockerfile builds an image leveraging gunicorn: - -```dockerfile -FROM python -RUN pip install flask -RUN pip install gunicorn -RUN pip install redis -COPY . /src -WORKDIR /src -CMD gunicorn --bind 0.0.0.0:5000 --workers 10 counter:app -EXPOSE 5000 -``` - -(Source: [trainingwheels Dockerfile](https://github.com/jpetazzo/trainingwheels/blob/master/www/Dockerfile)) - ---- - -## Development Compose file - -This Compose file uses the same image, but with a few overrides for development: - -- the Flask development server is used (overriding `CMD`), - -- the `DEBUG` environment variable is set, - -- a volume is used to provide a faster local development workflow. - -.small[ -```yaml -services: - www: - build: www - ports: - - 8000:5000 - user: nobody - environment: - DEBUG: 1 - command: python counter.py - volumes: - - ./www:/src -``` -] - -(Source: [trainingwheels Compose file](https://github.com/jpetazzo/trainingwheels/blob/master/docker-compose.yml)) - ---- - ## How to know which best practices are better? - The main goal of containers is to make our lives easier. diff --git a/slides/containers/Initial_Images.md b/slides/containers/Initial_Images.md index 323a5380..8717286d 100644 --- a/slides/containers/Initial_Images.md +++ b/slides/containers/Initial_Images.md @@ -115,46 +115,7 @@ If an image is read-only, how do we change it? * A new image is created by stacking the new layer on top of the old image. ---- - -## A chicken-and-egg problem - -* The only way to create an image is by "freezing" a container. - -* The only way to create a container is by instantiating an image. - -* Help! - ---- - -## Creating the first images - -There is a special empty image called `scratch`. - -* It allows to *build from scratch*. - -The `docker import` command loads a tarball into Docker. - -* The imported tarball becomes a standalone image. -* That new image has a single layer. - -Note: you will probably never have to do this yourself. - ---- - -## Creating other images - -`docker commit` - -* Saves all the changes made to a container into a new layer. -* Creates a new image (effectively a copy of the container). - -`docker build` **(used 99% of the time)** - -* Performs a repeatable build sequence. -* This is the preferred method! - -We will explain both methods in a moment. +* This can be automated by writing a `Dockerfile` and then running `docker build`. --- @@ -162,15 +123,15 @@ We will explain both methods in a moment. There are three namespaces: -* Official images +* Official images on the Docker Hub e.g. `ubuntu`, `busybox` ... -* User (and organizations) images +* User (and organizations) images on the Docker Hub e.g. `jpetazzo/clock` -* Self-hosted images +* Images on registries that are NOT the Docker Hub e.g. `registry.example.com:5000/my-private/image` @@ -283,30 +244,6 @@ jpetazzo/clock latest 12068b93616f 12 months ago 2.433 MB --- -## Searching for images - -We cannot list *all* images on a remote registry, but -we can search for a specific keyword: - -```bash -$ docker search marathon -NAME DESCRIPTION STARS OFFICIAL AUTOMATED -mesosphere/marathon A cluster-wide init and co... 105 [OK] -mesoscloud/marathon Marathon 31 [OK] -mesosphere/marathon-lb Script to update haproxy b... 22 [OK] -tobilg/mongodb-marathon A Docker image to start a ... 4 [OK] -``` - - -* "Stars" indicate the popularity of the image. - -* "Official" images are those in the root namespace. - -* "Automated" images are built automatically by the Docker Hub. -
(This means that their build recipe is always available.) - ---- - ## Downloading images There are two ways to download images. diff --git a/slides/containers/Local_Development_Workflow.md b/slides/containers/Local_Development_Workflow.md index 57a5b540..bd42a71d 100644 --- a/slides/containers/Local_Development_Workflow.md +++ b/slides/containers/Local_Development_Workflow.md @@ -314,52 +314,6 @@ class: extra-details --- -## Trash your servers and burn your code - -*(This is the title of a -[2013 blog post][immutable-deployments] -by Chad Fowler, where he explains the concept of immutable infrastructure.)* - -[immutable-deployments]: https://web.archive.org/web/20160305073617/http://chadfowler.com/blog/2013/06/23/immutable-deployments/ - --- - -* Let's majorly mess up our container. - - (Remove files or whatever.) - -* Now, how can we fix this? - --- - -* Our old container (with the blue version of the code) is still running. - -* See on which port it is exposed: - ```bash - docker ps - ``` - -* Point our browser to it to confirm that it still works fine. - ---- - -## Immutable infrastructure in a nutshell - -* Instead of *updating* a server, we deploy a new one. - -* This might be challenging with classical servers, but it's trivial with containers. - -* In fact, with Docker, the most logical workflow is to build a new image and run it. - -* If something goes wrong with the new image, we can always restart the old one. - -* We can even keep both versions running side by side. - -If this pattern sounds interesting, you might want to read about *blue/green deployment* -and *canary deployments*. - ---- - ## Recap of the development workflow 1. Write a Dockerfile to build an image containing our development environment. @@ -387,35 +341,6 @@ and *canary deployments*. class: extra-details -## Debugging inside the container - -Docker has a command called `docker exec`. - -It allows users to run a new process in a container which is already running. - -If sometimes you find yourself wishing you could SSH into a container: you can use `docker exec` instead. - -You can get a shell prompt inside an existing container this way, or run an arbitrary process for automation. - ---- - -class: extra-details - -## `docker exec` example - -```bash -$ # You can run ruby commands in the area the app is running and more! -$ docker exec -it bash -root@5ca27cf74c2e:/opt/namer# irb -irb(main):001:0> [0, 1, 2, 3, 4].map {|x| x ** 2}.compact -=> [0, 1, 4, 9, 16] -irb(main):002:0> exit -``` - ---- - -class: extra-details - ## Stopping the container Now that we're done let's stop our container. diff --git a/slides/containers/More_Dockerfile_Instructions.md b/slides/containers/More_Dockerfile_Instructions.md new file mode 100644 index 00000000..449b3d59 --- /dev/null +++ b/slides/containers/More_Dockerfile_Instructions.md @@ -0,0 +1,140 @@ + +class: title + +# More Dockerfile Instructions + +![construction](images/title-advanced-dockerfiles.jpg) + +--- + +## `Dockerfile` usage summary + +* `Dockerfile` instructions are executed in order. + +* Each instruction creates a new layer in the image. + +* Docker maintains a cache with the layers of previous builds. + +* When there are no changes in the instructions and files making a layer, + the builder re-uses the cached layer, without executing the instruction for that layer. + +* The `FROM` instruction MUST be the first non-comment instruction. + +* Lines starting with `#` are treated as comments. + +* Some instructions (like `CMD` or `ENTRYPOINT`) update a piece of metadata. + + (As a result, each call to these instructions makes the previous one useless.) + +--- + +## The `EXPOSE` instruction + +The `EXPOSE` instruction tells Docker what ports are to be published +in this image. + +```dockerfile +EXPOSE 8080 +EXPOSE 80 443 +EXPOSE 53/tcp 53/udp +``` + +* All ports are private by default. + +* Declaring a port with `EXPOSE` is not enough to make it public. + +* The `Dockerfile` doesn't control on which port a service gets exposed. + +--- + +## Exposing ports + +* When you `docker run -p ...`, that port becomes public. + + (Even if it was not declared with `EXPOSE`.) + +* When you `docker run -P ...` (without port number), all ports + declared with `EXPOSE` become public. + +A *public port* is reachable from other containers and from outside the host. + +A *private port* is not reachable from outside. + +--- + +## `VOLUME` + +The `VOLUME` instruction tells Docker that a specific directory +should be a *volume*. + +```dockerfile +VOLUME /var/lib/mysql +``` + +Filesystem access in volumes bypasses the copy-on-write layer, +offering native performance to I/O done in those directories. + +Volumes can be attached to multiple containers, allowing to +"port" data over from a container to another, e.g. to +upgrade a database to a newer version. + +It is possible to start a container in "read-only" mode. +The container filesystem will be made read-only, but volumes +can still have read/write access if necessary. + +--- + +## The `WORKDIR` instruction + +The `WORKDIR` instruction sets the working directory for subsequent +instructions. + +It also affects `CMD` and `ENTRYPOINT`, since it sets the working +directory used when starting the container. + +```dockerfile +WORKDIR /src +``` + +You can specify `WORKDIR` again to change the working directory for +further operations. + +--- + +## The `ENV` instruction + +The `ENV` instruction specifies environment variables that should be +set in any container launched from the image. + +```dockerfile +ENV WEBAPP_PORT 8080 +``` + +This will result in an environment variable being created in any +containers created from this image of + +```bash +WEBAPP_PORT=8080 +``` + +You can also specify environment variables when you use `docker run`. + +```bash +$ docker run -e WEBAPP_PORT=8000 -e WEBAPP_HOST=www.example.com ... +``` + +--- + +class: extra-details + +## The `USER` instruction + +The `USER` instruction sets the user name or UID to use when running +the image. + +It can be used multiple times to change back to root or to another user. + +??? + +:EN:- Advanced Dockerfile syntax +:FR:- Dockerfile niveau expert diff --git a/slides/containers/Multi_Stage_Builds.md b/slides/containers/Multi_Stage_Builds.md index e885c687..d3543156 100644 --- a/slides/containers/Multi_Stage_Builds.md +++ b/slides/containers/Multi_Stage_Builds.md @@ -48,161 +48,6 @@ Therefore, `RUN rm` does not reduce the size of the image or free up disk space. --- -## Removing unnecessary files - -Various techniques are available to obtain smaller images: - -- collapsing layers, - -- adding binaries that are built outside of the Dockerfile, - -- squashing the final image, - -- multi-stage builds. - -Let's review them quickly. - ---- - -## Collapsing layers - -You will frequently see Dockerfiles like this: - -```dockerfile -FROM ubuntu -RUN apt-get update && apt-get install xxx && ... && apt-get remove xxx && ... -``` - -Or the (more readable) variant: - -```dockerfile -FROM ubuntu -RUN apt-get update \ - && apt-get install xxx \ - && ... \ - && apt-get remove xxx \ - && ... -``` - -This `RUN` command gives us a single layer. - -The files that are added, then removed in the same layer, do not grow the layer size. - ---- - -## Collapsing layers: pros and cons - -Pros: - -- works on all versions of Docker - -- doesn't require extra tools - -Cons: - -- not very readable - -- some unnecessary files might still remain if the cleanup is not thorough - -- that layer is expensive (slow to build) - ---- - -## Building binaries outside of the Dockerfile - -This results in a Dockerfile looking like this: - -```dockerfile -FROM ubuntu -COPY xxx /usr/local/bin -``` - -Of course, this implies that the file `xxx` exists in the build context. - -That file has to exist before you can run `docker build`. - -For instance, it can: - -- exist in the code repository, -- be created by another tool (script, Makefile...), -- be created by another container image and extracted from the image. - -See for instance the [busybox official image](https://github.com/docker-library/busybox/blob/fe634680e32659aaf0ee0594805f74f332619a90/musl/Dockerfile) or this [older busybox image](https://github.com/jpetazzo/docker-busybox). - ---- - -## Building binaries outside: pros and cons - -Pros: - -- final image can be very small - -Cons: - -- requires an extra build tool - -- we're back in dependency hell and "works on my machine" - -Cons, if binary is added to code repository: - -- breaks portability across different platforms - -- grows repository size a lot if the binary is updated frequently - ---- - -## Squashing the final image - -The idea is to transform the final image into a single-layer image. - -This can be done in (at least) two ways. - -- Activate experimental features and squash the final image: - ```bash - docker image build --squash ... - ``` - -- Export/import the final image. - ```bash - docker build -t temp-image . - docker run --entrypoint true --name temp-container temp-image - docker export temp-container | docker import - final-image - docker rm temp-container - docker rmi temp-image - ``` - ---- - -## Squashing the image: pros and cons - -Pros: - -- single-layer images are smaller and faster to download - -- removed files no longer take up storage and network resources - -Cons: - -- we still need to actively remove unnecessary files - -- squash operation can take a lot of time (on big images) - -- squash operation does not benefit from cache -
- (even if we change just a tiny file, the whole image needs to be re-squashed) - ---- - -## Multi-stage builds - -Multi-stage builds allow us to have multiple *stages*. - -Each stage is a separate image, and can copy files from previous stages. - -We're going to see how they work in more detail. - ---- - # Multi-stage builds * At any point in our `Dockerfile`, we can add a new `FROM` line. @@ -315,7 +160,7 @@ class: extra-details (instead of using multiple Dockerfiles, which could go out of sync) --- +--- class: extra-details diff --git a/slides/intro-fullday.yml b/slides/docker.yml similarity index 53% rename from slides/intro-fullday.yml rename to slides/docker.yml index 7b4dcd9d..fe21f821 100644 --- a/slides/intro-fullday.yml +++ b/slides/docker.yml @@ -1,13 +1,11 @@ title: | - Introduction - to Containers + Docker -chat: "[Slack](https://dockercommunity.slack.com/messages/C7GKACWDV)" -#chat: "[Gitter](https://gitter.im/jpetazzo/workshop-yyyymmdd-city)" +#chat: "[Mattermost](https://training.enix.io/mattermost)" gitrepo: github.com/jpetazzo/container.training -slides: https://container.training/ +slides: https://2025-11-docker.container.training/ #slidenumberprefix: "#SomeHashTag — " @@ -19,56 +17,38 @@ content: - logistics.md - containers/intro.md - shared/about-slides.md -- shared/chat-room-im.md -#- shared/chat-room-slack.md +#- shared/chat-room-im.md #- shared/chat-room-zoom-meeting.md #- shared/chat-room-zoom-webinar.md - shared/toc.md -- +- # MORNING #- containers/Docker_Overview.md #- containers/Docker_History.md - containers/Training_Environment.md #- containers/Installing_Docker.md - containers/First_Containers.md - containers/Background_Containers.md - #- containers/Start_And_Attach.md - - containers/Naming_And_Inspecting.md - #- containers/Labels.md - - containers/Getting_Inside.md - containers/Initial_Images.md -- - - containers/Building_Images_Interactively.md + #- containers/Building_Images_Interactively.md - containers/Building_Images_With_Dockerfiles.md - containers/Cmd_And_Entrypoint.md - containers/Copying_Files_During_Build.md + - containers/Dockerfile_Tips.md + - containers/More_Dockerfile_Instructions.md + - containers/Multi_Stage_Builds.md - containers/Exercise_Dockerfile_Basic.md -- + - containers/Exercise_Dockerfile_Multistage.md +- # AFTERNOON - containers/Container_Networking_Basics.md - #- containers/Network_Drivers.md - containers/Local_Development_Workflow.md - - containers/Container_Network_Model.md - - shared/yaml.md + #- containers/Container_Network_Model.md - containers/Compose_For_Dev_Stacks.md - containers/Exercise_Composefile.md -- - - containers/Multi_Stage_Builds.md + #- containers/Start_And_Attach.md + #- containers/Naming_And_Inspecting.md + #- containers/Labels.md + #- containers/Getting_Inside.md #- containers/Publishing_To_Docker_Hub.md - - containers/Dockerfile_Tips.md - - containers/Exercise_Dockerfile_Multistage.md - #- containers/Docker_Machine.md - #- containers/Advanced_Dockerfiles.md #- containers/Buildkit.md - #- containers/Exercise_Dockerfile_Buildkit.md - #- containers/Init_Systems.md - #- containers/Application_Configuration.md - #- containers/Logging.md - #- containers/Namespaces_Cgroups.md - #- containers/Copy_On_Write.md - #- containers/Containers_From_Scratch.md - #- containers/Container_Engines.md - #- containers/Security.md - #- containers/Pods_Anatomy.md - #- containers/Ecosystem.md - #- containers/Orchestration_Overview.md - shared/thankyou.md - - containers/links.md + diff --git a/slides/intro-selfpaced.yml b/slides/intro-selfpaced.yml deleted file mode 100644 index e806f7e6..00000000 --- a/slides/intro-selfpaced.yml +++ /dev/null @@ -1,77 +0,0 @@ -title: | - Introduction - to Containers - -chat: "[Slack](https://dockercommunity.slack.com/messages/C7GKACWDV)" -#chat: "[Gitter](https://gitter.im/jpetazzo/workshop-yyyymmdd-city)" - -gitrepo: github.com/jpetazzo/container.training - -slides: https://container.training/ - -#slidenumberprefix: "#SomeHashTag — " - -exclude: -- in-person - -content: -- shared/title.md -# - shared/logistics.md -- containers/intro.md -- shared/about-slides.md -#- shared/chat-room-im.md -#- shared/chat-room-slack.md -#- shared/chat-room-zoom-meeting.md -#- shared/chat-room-zoom-webinar.md -- shared/toc.md -- - containers/Docker_Overview.md - - containers/Docker_History.md - - containers/Training_Environment.md - - containers/Installing_Docker.md - - containers/First_Containers.md - - containers/Background_Containers.md - - containers/Start_And_Attach.md -- - containers/Initial_Images.md - - containers/Building_Images_Interactively.md - - containers/Building_Images_With_Dockerfiles.md - - containers/Cmd_And_Entrypoint.md - - containers/Copying_Files_During_Build.md - - containers/Exercise_Dockerfile_Basic.md -- - containers/Multi_Stage_Builds.md - - containers/Publishing_To_Docker_Hub.md - - containers/Dockerfile_Tips.md - - containers/Exercise_Dockerfile_Multistage.md -- - containers/Naming_And_Inspecting.md - - containers/Labels.md - - containers/Getting_Inside.md -- - containers/Container_Networking_Basics.md - - containers/Network_Drivers.md - - containers/Container_Network_Model.md - #- containers/Connecting_Containers_With_Links.md - - containers/Ambassadors.md -- - containers/Local_Development_Workflow.md - - containers/Windows_Containers.md - - containers/Working_With_Volumes.md - - shared/yaml.md - - containers/Compose_For_Dev_Stacks.md - - containers/Exercise_Composefile.md - - containers/Docker_Machine.md -- - containers/Advanced_Dockerfiles.md - - containers/Buildkit.md - - containers/Exercise_Dockerfile_Buildkit.md - - containers/Init_Systems.md - - containers/Application_Configuration.md - - containers/Logging.md - - containers/Resource_Limits.md -- - containers/Namespaces_Cgroups.md - - containers/Copy_On_Write.md - - containers/Containers_From_Scratch.md - - containers/Security.md - - containers/Rootless_Networking.md - - containers/Images_Deep_Dive.md -- - containers/Container_Engines.md - - containers/Pods_Anatomy.md - - containers/Ecosystem.md - - containers/Orchestration_Overview.md - - shared/thankyou.md - - containers/links.md diff --git a/slides/intro-twodays.yml b/slides/intro-twodays.yml deleted file mode 100644 index 2ef4bbac..00000000 --- a/slides/intro-twodays.yml +++ /dev/null @@ -1,84 +0,0 @@ -title: | - Introduction - to Containers - -chat: "[Slack](https://dockercommunity.slack.com/messages/C7GKACWDV)" -#chat: "[Gitter](https://gitter.im/jpetazzo/workshop-yyyymmdd-city)" - -gitrepo: github.com/jpetazzo/container.training - -slides: https://container.training/ - -#slidenumberprefix: "#SomeHashTag — " - -exclude: -- self-paced - -content: -- shared/title.md -- logistics.md -- containers/intro.md -- shared/about-slides.md -- shared/chat-room-im.md -#- shared/chat-room-slack.md -#- shared/chat-room-zoom-meeting.md -#- shared/chat-room-zoom-webinar.md -- shared/toc.md -- # DAY 1 - - containers/Docker_Overview.md - #- containers/Docker_History.md - - containers/Training_Environment.md - - containers/First_Containers.md - - containers/Background_Containers.md - - containers/Initial_Images.md -- - - containers/Building_Images_Interactively.md - - containers/Building_Images_With_Dockerfiles.md - - containers/Cmd_And_Entrypoint.md - - containers/Copying_Files_During_Build.md - - containers/Exercise_Dockerfile_Basic.md -- - - containers/Dockerfile_Tips.md - - containers/Multi_Stage_Builds.md - - containers/Publishing_To_Docker_Hub.md - - containers/Exercise_Dockerfile_Multistage.md -- - - containers/Naming_And_Inspecting.md - - containers/Labels.md - - containers/Start_And_Attach.md - - containers/Getting_Inside.md - - containers/Resource_Limits.md -- # DAY 2 - - containers/Container_Networking_Basics.md - - containers/Network_Drivers.md - - containers/Container_Network_Model.md -- - - containers/Local_Development_Workflow.md - - containers/Working_With_Volumes.md - - shared/yaml.md - - containers/Compose_For_Dev_Stacks.md - - containers/Exercise_Composefile.md -- - - containers/Installing_Docker.md - - containers/Container_Engines.md - - containers/Init_Systems.md - - containers/Advanced_Dockerfiles.md - - containers/Buildkit.md - - containers/Exercise_Dockerfile_Buildkit.md -- - - containers/Application_Configuration.md - - containers/Logging.md - - containers/Orchestration_Overview.md -- - - shared/thankyou.md - - containers/links.md -#- - #- containers/Docker_Machine.md - #- containers/Ambassadors.md - #- containers/Namespaces_Cgroups.md - #- containers/Copy_On_Write.md - #- containers/Containers_From_Scratch.md - #- containers/Rootless_Networking.md - #- containers/Security.md - #- containers/Pods_Anatomy.md - #- containers/Ecosystem.md diff --git a/slides/kadm-fullday.yml b/slides/kadm-fullday.yml deleted file mode 100644 index b4f3c193..00000000 --- a/slides/kadm-fullday.yml +++ /dev/null @@ -1,65 +0,0 @@ -title: | - Kubernetes - for Admins and Ops - -#chat: "[Slack](https://dockercommunity.slack.com/messages/C7GKACWDV)" -#chat: "[Gitter](https://gitter.im/jpetazzo/workshop-yyyymmdd-city)" -chat: "In person!" - -gitrepo: github.com/jpetazzo/container.training - -slides: https://container.training/ - -#slidenumberprefix: "#SomeHashTag — " - -exclude: -- self-paced -- static-pods-exercise - -content: -- shared/title.md -- logistics.md -- k8s/intro.md -- shared/about-slides.md -- shared/chat-room-im.md -#- shared/chat-room-slack.md -#- shared/chat-room-zoom-meeting.md -#- shared/chat-room-zoom-webinar.md -- shared/toc.md -- - - k8s/prereqs-advanced.md - - shared/handson.md - - k8s/architecture.md - #- k8s/internal-apis.md - - k8s/deploymentslideshow.md - - k8s/dmuc-easy.md -- - - k8s/dmuc-medium.md - - k8s/dmuc-hard.md - #- k8s/multinode.md - #- k8s/cni.md - - k8s/cni-internals.md - #- k8s/interco.md -- - - k8s/apilb.md - #- k8s/setup-overview.md - #- k8s/setup-devel.md - #- k8s/setup-managed.md - #- k8s/setup-selfhosted.md - - k8s/cluster-upgrade.md - - k8s/cluster-backup.md - - k8s/staticpods.md -- - #- k8s/cloud-controller-manager.md - #- k8s/bootstrap.md - - k8s/control-plane-auth.md - - k8s/pod-security-intro.md - - k8s/pod-security-policies.md - - k8s/pod-security-admission.md - - k8s/user-cert.md - - k8s/csr-api.md - - k8s/openid-connect.md -- - #- k8s/lastwords-admin.md - - k8s/links.md - - shared/thankyou.md diff --git a/slides/kadm-twodays.yml b/slides/kadm-twodays.yml deleted file mode 100644 index 345407da..00000000 --- a/slides/kadm-twodays.yml +++ /dev/null @@ -1,96 +0,0 @@ -title: | - Kubernetes - for administrators - and operators - -#chat: "[Slack](https://dockercommunity.slack.com/messages/C7GKACWDV)" -#chat: "[Gitter](https://gitter.im/jpetazzo/workshop-yyyymmdd-city)" -chat: "In person!" - -gitrepo: github.com/jpetazzo/container.training - -slides: https://container.training/ - -#slidenumberprefix: "#SomeHashTag — " - -exclude: -- self-paced - -content: -- shared/title.md -- logistics.md -- k8s/intro.md -- shared/about-slides.md -- shared/chat-room-im.md -#- shared/chat-room-slack.md -#- shared/chat-room-zoom-meeting.md -#- shared/chat-room-zoom-webinar.md -- shared/toc.md -# DAY 1 -- - k8s/prereqs-advanced.md - - shared/handson.md - - k8s/architecture.md - - k8s/internal-apis.md - - k8s/deploymentslideshow.md - - k8s/dmuc-easy.md -- - k8s/dmuc-medium.md - - k8s/dmuc-hard.md - #- k8s/multinode.md - #- k8s/cni.md - - k8s/cni-internals.md - #- k8s/interco.md -- - k8s/apilb.md - - k8s/setup-overview.md - #- k8s/setup-devel.md - - k8s/setup-managed.md - - k8s/setup-selfhosted.md - - k8s/cluster-upgrade.md - - k8s/staticpods.md -- - k8s/cluster-backup.md - - k8s/cloud-controller-manager.md - - k8s/healthchecks.md - - k8s/healthchecks-more.md -# DAY 2 -- - k8s/kubercoins.md - - k8s/logs-cli.md - - k8s/logs-centralized.md - - k8s/authn-authz.md - - k8s/user-cert.md - - k8s/csr-api.md -- - k8s/openid-connect.md - - k8s/control-plane-auth.md - ###- k8s/bootstrap.md - - k8s/netpol.md - - k8s/pod-security-intro.md - - k8s/pod-security-policies.md - - k8s/pod-security-admission.md -- - k8s/resource-limits.md - - k8s/metrics-server.md - - k8s/cluster-sizing.md - - k8s/disruptions.md - - k8s/horizontal-pod-autoscaler.md -- - k8s/prometheus.md - #- k8s/prometheus-stack.md - - k8s/extending-api.md - - k8s/crd.md - - k8s/operators.md - - k8s/eck.md - ###- k8s/operators-design.md - ###- k8s/operators-example.md -# CONCLUSION -- - k8s/lastwords.md - - k8s/links.md - - shared/thankyou.md - - | - # (All content after this slide is bonus material) -# EXTRA -- - k8s/volumes.md - - k8s/configuration.md - - k8s/secrets.md - - k8s/statefulsets.md - - k8s/consul.md - - k8s/pv-pvc-sc.md - - k8s/volume-claim-templates.md - #- k8s/portworx.md - - k8s/openebs.md - - k8s/stateful-failover.md diff --git a/slides/kube-adv.yml b/slides/kube-adv.yml deleted file mode 100644 index b66aaf9e..00000000 --- a/slides/kube-adv.yml +++ /dev/null @@ -1,94 +0,0 @@ -title: | - Advanced - Kubernetes - -chat: "[Slack](https://dockercommunity.slack.com/messages/C7GKACWDV)" -#chat: "[Gitter](https://gitter.im/jpetazzo/workshop-yyyymmdd-city)" - -gitrepo: github.com/jpetazzo/container.training - -slides: https://container.training/ - -#slidenumberprefix: "#SomeHashTag — " - -exclude: -- self-paced - -content: -- shared/title.md -- logistics.md -- k8s/intro.md -- shared/about-slides.md -#- shared/chat-room-im.md -#- shared/chat-room-slack.md -#- shared/chat-room-zoom-meeting.md -#- shared/chat-room-zoom-webinar.md -- shared/toc.md -- #1 - - k8s/prereqs-advanced.md - - shared/handson.md - - k8s/architecture.md - - k8s/internal-apis.md - - k8s/deploymentslideshow.md - - k8s/dmuc-easy.md -- #2 - - k8s/dmuc-medium.md - - k8s/dmuc-hard.md - #- k8s/multinode.md - #- k8s/cni.md - #- k8s/interco.md - - k8s/cni-internals.md -- #3 - - k8s/apilb.md - - k8s/control-plane-auth.md - - | - # (Extra content) - - k8s/staticpods.md - - k8s/cluster-upgrade.md -- #4 - - k8s/kustomize.md - - k8s/helm-intro.md - - k8s/helm-chart-format.md - - k8s/helm-create-basic-chart.md - - | - # (Extra content) - - k8s/helm-create-better-chart.md - - k8s/helm-dependencies.md - - k8s/helm-values-schema-validation.md - - k8s/helm-secrets.md - - k8s/ytt.md -- #5 - - k8s/extending-api.md - - k8s/operators.md - - k8s/sealed-secrets.md - - k8s/crd.md -- #6 - - k8s/ingress-tls.md - #- k8s/ingress-advanced.md - #- k8s/ingress-canary.md - - k8s/gateway-api.md - - k8s/cert-manager.md - - k8s/cainjector.md - - k8s/eck.md -- #7 - - k8s/admission.md - - k8s/kyverno.md -- #8 - - k8s/aggregation-layer.md - - k8s/metrics-server.md - - k8s/prometheus.md - - k8s/prometheus-stack.md - - k8s/hpa-v2.md -- #9 - - k8s/operators-design.md - - k8s/operators-example.md - - k8s/kubebuilder.md - - k8s/events.md - - k8s/finalizers.md - - | - # (Extra content) - - k8s/owners-and-dependents.md - - k8s/apiserver-deepdive.md - #- k8s/record.md - - shared/thankyou.md - diff --git a/slides/kube-fullday.yml b/slides/kube-fullday.yml deleted file mode 100644 index 853f11c2..00000000 --- a/slides/kube-fullday.yml +++ /dev/null @@ -1,137 +0,0 @@ -title: | - Deploying and Scaling Microservices - with Kubernetes - -#chat: "[Slack](https://dockercommunity.slack.com/messages/C7GKACWDV)" -#chat: "[Gitter](https://gitter.im/jpetazzo/workshop-yyyymmdd-city)" -chat: "In person!" - -gitrepo: github.com/jpetazzo/container.training - -slides: https://container.training/ - -#slidenumberprefix: "#SomeHashTag — " - -exclude: -- self-paced - -content: -- shared/title.md -- logistics.md -- k8s/intro.md -- shared/about-slides.md -- shared/chat-room-im.md -#- shared/chat-room-slack.md -#- shared/chat-room-zoom-meeting.md -#- shared/chat-room-zoom-webinar.md -- shared/toc.md -- - - shared/prereqs.md - - shared/handson.md - #- shared/webssh.md - - shared/connecting.md - #- k8s/versions-k8s.md - - shared/sampleapp.md - #- shared/composescale.md - #- shared/hastyconclusions.md - - shared/composedown.md - - k8s/concepts-k8s.md - - k8s/kubectlget.md -- - - k8s/kubectl-run.md - #- k8s/batch-jobs.md - - shared/declarative.md - - k8s/declarative.md - - k8s/deploymentslideshow.md - - k8s/kubectlexpose.md - - k8s/service-types.md - - k8s/kubenet.md - - k8s/shippingimages.md - #- k8s/buildshiprun-selfhosted.md - - k8s/buildshiprun-dockerhub.md - - k8s/ourapponkube.md - #- k8s/exercise-wordsmith.md -- - - k8s/labels-annotations.md - - k8s/kubectl-logs.md - - k8s/logs-cli.md - - k8s/yamldeploy.md - - k8s/namespaces.md - - k8s/setup-overview.md - - k8s/setup-devel.md - #- k8s/setup-managed.md - #- k8s/setup-selfhosted.md -- - - k8s/dashboard.md - - k8s/rollout.md - - k8s/healthchecks.md - - k8s/ingress.md - #- k8s/gateway-api.md - #- k8s/volumes.md - - k8s/configuration.md - - k8s/secrets.md - - k8s/openebs.md - #- k8s/k9s.md - #- k8s/tilt.md - #- k8s/kubectlscale.md - #- k8s/scalingdockercoins.md - #- shared/hastyconclusions.md - #- k8s/daemonset.md - #- shared/yaml.md - #- k8s/exercise-yaml.md - #- k8s/localkubeconfig.md - #- k8s/access-eks-cluster.md - #- k8s/accessinternal.md - #- k8s/kubectlproxy.md - #- k8s/healthchecks-more.md - #- k8s/record.md - #- k8s/ingress-tls.md - #- k8s/kustomize.md - #- k8s/helm-intro.md - #- k8s/helm-chart-format.md - #- k8s/helm-create-basic-chart.md - #- k8s/helm-create-better-chart.md - #- k8s/helm-dependencies.md - #- k8s/helm-values-schema-validation.md - #- k8s/helm-secrets.md - #- k8s/exercise-helm.md - #- k8s/ytt.md - #- k8s/gitlab.md - #- k8s/create-chart.md - #- k8s/create-more-charts.md - #- k8s/netpol.md - #- k8s/authn-authz.md - #- k8s/user-cert.md - #- k8s/csr-api.md - #- k8s/openid-connect.md - #- k8s/pod-security-intro.md - #- k8s/pod-security-policies.md - #- k8s/pod-security-admission.md - #- k8s/exercise-configmap.md - #- k8s/build-with-docker.md - #- k8s/build-with-kaniko.md - #- k8s/logs-centralized.md - #- k8s/prometheus.md - #- k8s/prometheus-stack.md - #- k8s/statefulsets.md - #- k8s/consul.md - #- k8s/pv-pvc-sc.md - #- k8s/volume-claim-templates.md - #- k8s/portworx.md - #- k8s/openebs.md - #- k8s/stateful-failover.md - #- k8s/extending-api.md - #- k8s/crd.md - #- k8s/admission.md - #- k8s/operators.md - #- k8s/operators-design.md - #- k8s/operators-example.md - #- k8s/staticpods.md - #- k8s/finalizers.md - #- k8s/owners-and-dependents.md - #- k8s/gitworkflows.md -- - #- k8s/whatsnext.md - - k8s/lastwords.md - #- k8s/links.md - - shared/thankyou.md diff --git a/slides/kube-halfday.yml b/slides/kube-halfday.yml deleted file mode 100644 index b22a1f99..00000000 --- a/slides/kube-halfday.yml +++ /dev/null @@ -1,91 +0,0 @@ -title: | - Kubernetes 101 - - -#chat: "[Slack](https://dockercommunity.slack.com/messages/C7GKACWDV)" -#chat: "[Gitter](https://gitter.im/jpetazzo/training-20180413-paris)" -chat: "In person!" - -gitrepo: github.com/jpetazzo/container.training - -slides: https://container.training/ - -#slidenumberprefix: "#SomeHashTag — " - -exclude: -- self-paced - -content: -- shared/title.md -#- logistics.md -# Bridget-specific; others use logistics.md -- logistics-bridget.md -- k8s/intro.md -- shared/about-slides.md -- shared/chat-room-im.md -#- shared/chat-room-slack.md -#- shared/chat-room-zoom-meeting.md -#- shared/chat-room-zoom-webinar.md -- shared/toc.md -- - shared/prereqs.md - - shared/handson.md - #- shared/webssh.md - - shared/connecting.md - - k8s/versions-k8s.md - - shared/sampleapp.md -# Bridget doesn't go into as much depth with compose - #- shared/composescale.md - #- shared/hastyconclusions.md - - shared/composedown.md - - k8s/concepts-k8s.md - - shared/declarative.md - - k8s/declarative.md - #- k8s/kubenet.md - - k8s/kubectlget.md - - k8s/setup-overview.md - #- k8s/setup-devel.md - #- k8s/setup-managed.md - #- k8s/setup-selfhosted.md -- - k8s/kubectl-run.md - #- k8s/batch-jobs.md - #- k8s/labels-annotations.md - - k8s/kubectl-logs.md - - k8s/deploymentslideshow.md - - k8s/kubectlexpose.md - #- k8s/service-types.md - - k8s/shippingimages.md - #- k8s/buildshiprun-selfhosted.md - - k8s/buildshiprun-dockerhub.md - - k8s/ourapponkube.md - #- k8s/localkubeconfig.md - #- k8s/access-eks-cluster.md - #- k8s/accessinternal.md - #- k8s/kubectlproxy.md -- - k8s/dashboard.md - #- k8s/k9s.md - #- k8s/tilt.md - #- k8s/kubectlscale.md - - k8s/scalingdockercoins.md - - shared/hastyconclusions.md - - k8s/daemonset.md - - k8s/rollout.md - #- k8s/record.md -- - k8s/logs-cli.md -# Bridget hasn't added EFK yet - #- k8s/logs-centralized.md - - k8s/namespaces.md - - k8s/helm-intro.md - #- k8s/helm-chart-format.md - - k8s/helm-create-basic-chart.md - #- k8s/helm-create-better-chart.md - #- k8s/helm-dependencies.md - #- k8s/helm-values-schema-validation.md - #- k8s/helm-secrets.md - #- k8s/kustomize.md - #- k8s/ytt.md - #- k8s/netpol.md - - k8s/whatsnext.md -# - k8s/links.md -# Bridget-specific - - k8s/links-bridget.md - - shared/thankyou.md diff --git a/slides/kube-selfpaced.yml b/slides/kube-selfpaced.yml deleted file mode 100644 index 8a9de8a2..00000000 --- a/slides/kube-selfpaced.yml +++ /dev/null @@ -1,176 +0,0 @@ -title: | - Deploying and Scaling Microservices - with Docker and Kubernetes - -chat: "[Slack](https://dockercommunity.slack.com/messages/C7GKACWDV)" -#chat: "[Gitter](https://gitter.im/jpetazzo/workshop-yyyymmdd-city)" - - -gitrepo: github.com/jpetazzo/container.training - -slides: https://container.training/ - -#slidenumberprefix: "#SomeHashTag — " - -exclude: -- in-person - -content: -- shared/title.md -#- logistics.md -- k8s/intro.md -- shared/about-slides.md -#- shared/chat-room-im.md -#- shared/chat-room-slack.md -#- shared/chat-room-zoom-meeting.md -#- shared/chat-room-zoom-webinar.md -- shared/toc.md -- - - shared/prereqs.md - - shared/handson.md - #- shared/webssh.md - - shared/connecting.md - - k8s/versions-k8s.md - - shared/sampleapp.md - #- shared/composescale.md - #- shared/hastyconclusions.md - - shared/composedown.md - - k8s/concepts-k8s.md -- - - k8s/kubectlget.md - - k8s/kubectl-run.md - - k8s/batch-jobs.md - - k8s/labels-annotations.md - - k8s/kubectl-logs.md - - k8s/logs-cli.md - - shared/declarative.md - - k8s/declarative.md - - k8s/deploymentslideshow.md -- - - k8s/kubectlexpose.md - - k8s/service-types.md - - k8s/kubenet.md - - k8s/shippingimages.md - - k8s/buildshiprun-selfhosted.md - - k8s/buildshiprun-dockerhub.md - - k8s/ourapponkube.md - #- k8s/exercise-wordsmith.md - - shared/yaml.md - - k8s/yamldeploy.md - - k8s/namespaces.md -- - - k8s/setup-overview.md - - k8s/setup-devel.md - - k8s/setup-managed.md - - k8s/setup-selfhosted.md - - k8s/dashboard.md - - k8s/k9s.md - - k8s/tilt.md - #- k8s/kubectlscale.md - - k8s/scalingdockercoins.md - - shared/hastyconclusions.md - - k8s/daemonset.md - #- k8s/exercise-yaml.md -- - - k8s/rollout.md - - k8s/healthchecks.md - - k8s/healthchecks-more.md - - k8s/record.md -- - - k8s/localkubeconfig.md - #- k8s/access-eks-cluster.md - - k8s/accessinternal.md - - k8s/kubectlproxy.md -- - - k8s/ingress.md - - k8s/ingress-advanced.md - #- k8s/ingress-canary.md - - k8s/ingress-tls.md - - k8s/gateway-api.md - - k8s/cert-manager.md - - k8s/cainjector.md - - k8s/kustomize.md - - k8s/helm-intro.md - - k8s/helm-chart-format.md - - k8s/helm-create-basic-chart.md - - k8s/helm-create-better-chart.md - - k8s/helm-dependencies.md - - k8s/helm-values-schema-validation.md - - k8s/helm-secrets.md - #- k8s/exercise-helm.md - - k8s/gitlab.md - - k8s/ytt.md -- - - k8s/netpol.md - - k8s/authn-authz.md - - k8s/pod-security-intro.md - - k8s/pod-security-policies.md - - k8s/pod-security-admission.md - - k8s/user-cert.md - - k8s/csr-api.md - - k8s/openid-connect.md - - k8s/control-plane-auth.md -- - - k8s/volumes.md - #- k8s/exercise-configmap.md - - k8s/build-with-docker.md - - k8s/build-with-kaniko.md -- - - k8s/configuration.md - - k8s/secrets.md - - k8s/statefulsets.md - - k8s/consul.md - - k8s/pv-pvc-sc.md - - k8s/volume-claim-templates.md - - k8s/portworx.md - - k8s/openebs.md - - k8s/stateful-failover.md -- - - k8s/gitworkflows.md - - k8s/flux.md - - k8s/argocd.md -- - - k8s/logs-centralized.md - - k8s/prometheus.md - - k8s/prometheus-stack.md - - k8s/resource-limits.md - - k8s/metrics-server.md - - k8s/cluster-sizing.md - - k8s/disruptions.md - - k8s/cluster-autoscaler.md - - k8s/horizontal-pod-autoscaler.md - - k8s/hpa-v2.md -- - - k8s/extending-api.md - - k8s/apiserver-deepdive.md - - k8s/crd.md - - k8s/aggregation-layer.md - - k8s/admission.md - - k8s/operators.md - - k8s/operators-design.md - - k8s/operators-example.md - - k8s/kubebuilder.md - - k8s/kuik.md - - k8s/sealed-secrets.md - - k8s/kyverno.md - - k8s/eck.md - - k8s/finalizers.md - - k8s/owners-and-dependents.md - - k8s/events.md -- - - k8s/dmuc-easy.md - - k8s/dmuc-medium.md - - k8s/dmuc-hard.md - #- k8s/multinode.md - #- k8s/cni.md - - k8s/cni-internals.md - - k8s/apilb.md - - k8s/staticpods.md -- - - k8s/cluster-upgrade.md - - k8s/cluster-backup.md - - k8s/cloud-controller-manager.md -- - - k8s/lastwords.md - - k8s/links.md - - shared/thankyou.md diff --git a/slides/kube-twodays.yml b/slides/kube-twodays.yml deleted file mode 100644 index ba0dd4fd..00000000 --- a/slides/kube-twodays.yml +++ /dev/null @@ -1,137 +0,0 @@ -title: | - Deploying and Scaling Microservices - with Kubernetes - -#chat: "[Slack](https://dockercommunity.slack.com/messages/C7GKACWDV)" -#chat: "[Gitter](https://gitter.im/jpetazzo/workshop-yyyymmdd-city)" -chat: "In person!" - -gitrepo: github.com/jpetazzo/container.training - -slides: https://container.training/ - -#slidenumberprefix: "#SomeHashTag — " - -exclude: -- self-paced - -content: -- shared/title.md -- logistics.md -- k8s/intro.md -- shared/about-slides.md -- shared/chat-room-im.md -#- shared/chat-room-slack.md -#- shared/chat-room-zoom-meeting.md -#- shared/chat-room-zoom-webinar.md -- shared/toc.md -- - - shared/prereqs.md - - shared/handson.md - #- shared/webssh.md - - shared/connecting.md - #- k8s/versions-k8s.md - - shared/sampleapp.md - #- shared/composescale.md - #- shared/hastyconclusions.md - - shared/composedown.md - - k8s/concepts-k8s.md - - k8s/kubectlget.md -- - - k8s/kubectl-run.md - - k8s/batch-jobs.md - - k8s/labels-annotations.md - - k8s/kubectl-logs.md - - k8s/logs-cli.md - - shared/declarative.md - - k8s/declarative.md - - k8s/deploymentslideshow.md - - k8s/kubectlexpose.md - - k8s/service-types.md - - k8s/kubenet.md - - k8s/shippingimages.md - #- k8s/buildshiprun-selfhosted.md - - k8s/buildshiprun-dockerhub.md - - k8s/ourapponkube.md - #- k8s/exercise-wordsmith.md -- - - k8s/yamldeploy.md - - k8s/setup-overview.md - - k8s/setup-devel.md - #- k8s/setup-managed.md - #- k8s/setup-selfhosted.md - - k8s/dashboard.md - - k8s/k9s.md - #- k8s/tilt.md - #- k8s/kubectlscale.md - - k8s/scalingdockercoins.md - - shared/hastyconclusions.md - - k8s/daemonset.md - - shared/yaml.md - #- k8s/exercise-yaml.md -- - - k8s/localkubeconfig.md - #- k8s/access-eks-cluster.md - - k8s/accessinternal.md - #- k8s/kubectlproxy.md - - k8s/rollout.md - - k8s/healthchecks.md - #- k8s/healthchecks-more.md - - k8s/record.md -- - - k8s/namespaces.md - - k8s/ingress.md - #- k8s/ingress-advanced.md - #- k8s/ingress-canary.md - #- k8s/ingress-tls.md - #- k8s/gateway-api.md - - k8s/kustomize.md - - k8s/helm-intro.md - - k8s/helm-chart-format.md - - k8s/helm-create-basic-chart.md - - k8s/helm-create-better-chart.md - - k8s/helm-dependencies.md - - k8s/helm-values-schema-validation.md - - k8s/helm-secrets.md - #- k8s/exercise-helm.md - #- k8s/ytt.md - - k8s/gitlab.md -- - - k8s/netpol.md - - k8s/authn-authz.md - #- k8s/csr-api.md - #- k8s/openid-connect.md - #- k8s/pod-security-intro.md - #- k8s/pod-security-policies.md - #- k8s/pod-security-admission.md -- - - k8s/volumes.md - #- k8s/exercise-configmap.md - #- k8s/build-with-docker.md - #- k8s/build-with-kaniko.md - - k8s/configuration.md - - k8s/secrets.md - - k8s/logs-centralized.md - #- k8s/prometheus.md - #- k8s/prometheus-stack.md -- - - k8s/statefulsets.md - - k8s/consul.md - - k8s/pv-pvc-sc.md - - k8s/volume-claim-templates.md - #- k8s/portworx.md - - k8s/openebs.md - - k8s/stateful-failover.md - #- k8s/extending-api.md - #- k8s/admission.md - #- k8s/operators.md - #- k8s/operators-design.md - #- k8s/operators-example.md - #- k8s/staticpods.md - #- k8s/owners-and-dependents.md - #- k8s/gitworkflows.md -- - - k8s/whatsnext.md - - k8s/lastwords.md - - k8s/links.md - - shared/thankyou.md diff --git a/slides/logistics-pyladies.md b/slides/logistics-pyladies.md new file mode 100644 index 00000000..c7227443 --- /dev/null +++ b/slides/logistics-pyladies.md @@ -0,0 +1,59 @@ +## Introductions + +⚠️ This slide should be customized by the tutorial instructor(s). + + + + + + + + + + + +[@alexbuisine]: https://twitter.com/alexbuisine +[EphemeraSearch]: https://ephemerasearch.com/ +[@jpetazzo]: https://twitter.com/jpetazzo +[@jpetazzo@hachyderm.io]: https://hachyderm.io/@jpetazzo +[@s0ulshake]: https://twitter.com/s0ulshake +[Quantgene]: https://www.quantgene.com/ + diff --git a/slides/logistics.md b/slides/logistics.md index 2780e3c0..e54419f6 120000 --- a/slides/logistics.md +++ b/slides/logistics.md @@ -1 +1 @@ -logistics-template.md \ No newline at end of file +logistics-pyladies.md \ No newline at end of file diff --git a/slides/swarm-fullday.yml b/slides/swarm-fullday.yml deleted file mode 100644 index 8477e36d..00000000 --- a/slides/swarm-fullday.yml +++ /dev/null @@ -1,72 +0,0 @@ -title: | - Container Orchestration - with Docker and Swarm - -chat: "[Slack](https://dockercommunity.slack.com/messages/C7GKACWDV)" -#chat: "[Gitter](https://gitter.im/jpetazzo/workshop-yyyymmdd-city)" - -gitrepo: github.com/jpetazzo/container.training - -slides: https://container.training/ - -#slidenumberprefix: "#SomeHashTag — " - -exclude: -- self-paced -- snap -- btp-auto -- benchmarking -- elk-manual -- prom-manual - -content: -- shared/title.md -- logistics.md -- swarm/intro.md -- shared/about-slides.md -- shared/chat-room-im.md -#- shared/chat-room-slack.md -#- shared/chat-room-zoom-meeting.md -#- shared/chat-room-zoom-webinar.md -- shared/toc.md -- - shared/prereqs.md - - shared/handson.md - - shared/connecting.md - - swarm/versions.md - - shared/sampleapp.md - - shared/composescale.md - - shared/hastyconclusions.md - - shared/composedown.md - - swarm/swarmkit.md - - shared/declarative.md - - swarm/swarmmode.md - - swarm/creatingswarm.md - #- swarm/machine.md - - swarm/morenodes.md -- - swarm/firstservice.md - - swarm/ourapponswarm.md - - swarm/hostingregistry.md - - swarm/testingregistry.md - - swarm/btp-manual.md - - swarm/swarmready.md - - swarm/stacks.md - - swarm/cicd.md - - swarm/updatingservices.md - - swarm/rollingupdates.md - - swarm/healthchecks.md -- - swarm/operatingswarm.md - - swarm/netshoot.md - - swarm/ipsec.md - - swarm/swarmtools.md - - swarm/security.md - - swarm/secrets.md - - swarm/encryptionatrest.md - - swarm/leastprivilege.md - - swarm/apiscope.md -- - swarm/logging.md - - swarm/metrics.md - - swarm/gui.md - - swarm/stateful.md - - swarm/extratips.md - - shared/thankyou.md - - swarm/links.md diff --git a/slides/swarm-halfday.yml b/slides/swarm-halfday.yml deleted file mode 100644 index 926d4867..00000000 --- a/slides/swarm-halfday.yml +++ /dev/null @@ -1,71 +0,0 @@ -title: | - Container Orchestration - with Docker and Swarm - -chat: "[Slack](https://dockercommunity.slack.com/messages/C7GKACWDV)" -#chat: "[Gitter](https://gitter.im/jpetazzo/workshop-yyyymmdd-city)" - -gitrepo: github.com/jpetazzo/container.training - -slides: https://container.training/ - -#slidenumberprefix: "#SomeHashTag — " - -exclude: -- self-paced -- snap -- btp-manual -- benchmarking -- elk-manual -- prom-manual - -content: -- shared/title.md -- logistics.md -- swarm/intro.md -- shared/about-slides.md -- shared/chat-room-im.md -#- shared/chat-room-slack.md -#- shared/chat-room-zoom-meeting.md -#- shared/chat-room-zoom-webinar.md -- shared/toc.md -- - shared/prereqs.md - - shared/handson.md - - shared/connecting.md - - swarm/versions.md - - shared/sampleapp.md - - shared/composescale.md - - shared/hastyconclusions.md - - shared/composedown.md - - swarm/swarmkit.md - - shared/declarative.md - - swarm/swarmmode.md - - swarm/creatingswarm.md - #- swarm/machine.md - - swarm/morenodes.md -- - swarm/firstservice.md - - swarm/ourapponswarm.md - #- swarm/hostingregistry.md - #- swarm/testingregistry.md - #- swarm/btp-manual.md - #- swarm/swarmready.md - - swarm/stacks.md - - swarm/cicd.md - - swarm/updatingservices.md - #- swarm/rollingupdates.md - #- swarm/healthchecks.md -- - swarm/operatingswarm.md - #- swarm/netshoot.md - #- swarm/ipsec.md - #- swarm/swarmtools.md - - swarm/security.md - #- swarm/secrets.md - #- swarm/encryptionatrest.md - - swarm/leastprivilege.md - - swarm/apiscope.md - - swarm/logging.md - - swarm/metrics.md - #- swarm/stateful.md - #- swarm/extratips.md - - shared/thankyou.md - - swarm/links.md diff --git a/slides/swarm-selfpaced.yml b/slides/swarm-selfpaced.yml deleted file mode 100644 index 0bd815d9..00000000 --- a/slides/swarm-selfpaced.yml +++ /dev/null @@ -1,80 +0,0 @@ -title: | - Container Orchestration - with Docker and Swarm - -chat: "[Slack](https://dockercommunity.slack.com/messages/C7GKACWDV)" - -gitrepo: github.com/jpetazzo/container.training - -slides: https://container.training/ - -#slidenumberprefix: "#SomeHashTag — " - -exclude: -- in-person -- btp-auto - -content: -- shared/title.md -#- shared/logistics.md -- swarm/intro.md -- shared/about-slides.md -#- shared/chat-room-im.md -#- shared/chat-room-slack.md -#- shared/chat-room-zoom-meeting.md -#- shared/chat-room-zoom-webinar.md -- shared/toc.md -- - shared/prereqs.md - - shared/handson.md - - shared/connecting.md - - swarm/versions.md - - | - name: part-1 - - class: title, self-paced - - Part 1 - - shared/sampleapp.md - - shared/composescale.md - - shared/hastyconclusions.md - - shared/composedown.md - - swarm/swarmkit.md - - shared/declarative.md - - swarm/swarmmode.md - - swarm/creatingswarm.md - #- swarm/machine.md - - swarm/morenodes.md -- - swarm/firstservice.md - - swarm/ourapponswarm.md - - swarm/hostingregistry.md - - swarm/testingregistry.md - - swarm/btp-manual.md - - swarm/swarmready.md - - swarm/stacks.md - - swarm/cicd.md - - | - name: part-2 - - class: title, self-paced - - Part 2 -- - swarm/operatingswarm.md - - swarm/netshoot.md - - swarm/swarmnbt.md - - swarm/ipsec.md - - swarm/updatingservices.md - - swarm/rollingupdates.md - - swarm/healthchecks.md - - swarm/nodeinfo.md - - swarm/swarmtools.md -- - swarm/security.md - - swarm/secrets.md - - swarm/encryptionatrest.md - - swarm/leastprivilege.md - - swarm/apiscope.md - - swarm/logging.md - - swarm/metrics.md - - swarm/stateful.md - - swarm/extratips.md - - shared/thankyou.md - - swarm/links.md diff --git a/slides/swarm-video.yml b/slides/swarm-video.yml deleted file mode 100644 index 9c34166a..00000000 --- a/slides/swarm-video.yml +++ /dev/null @@ -1,75 +0,0 @@ -title: | - Container Orchestration - with Docker and Swarm - -chat: "[Slack](https://dockercommunity.slack.com/messages/C7GKACWDV)" - -gitrepo: github.com/jpetazzo/container.training - -slides: https://container.training/ - -#slidenumberprefix: "#SomeHashTag — " - -exclude: -- in-person -- btp-auto - -content: -- shared/title.md -#- shared/logistics.md -- swarm/intro.md -- shared/about-slides.md -- shared/toc.md -- - shared/prereqs.md - - shared/handson.md - - shared/connecting.md - - swarm/versions.md - - | - name: part-1 - - class: title, self-paced - - Part 1 - - shared/sampleapp.md - - shared/composescale.md - - shared/hastyconclusions.md - - shared/composedown.md - - swarm/swarmkit.md - - shared/declarative.md - - swarm/swarmmode.md - - swarm/creatingswarm.md - #- swarm/machine.md - - swarm/morenodes.md -- - swarm/firstservice.md - - swarm/ourapponswarm.md - - swarm/hostingregistry.md - - swarm/testingregistry.md - - swarm/btp-manual.md - - swarm/swarmready.md - - swarm/stacks.md - - | - name: part-2 - - class: title, self-paced - - Part 2 -- - swarm/operatingswarm.md - #- swarm/netshoot.md - #- swarm/swarmnbt.md - - swarm/ipsec.md - - swarm/updatingservices.md - - swarm/rollingupdates.md - #- swarm/healthchecks.md - - swarm/nodeinfo.md - - swarm/swarmtools.md -- - swarm/security.md - - swarm/secrets.md - - swarm/encryptionatrest.md - - swarm/leastprivilege.md - - swarm/apiscope.md - #- swarm/logging.md - #- swarm/metrics.md - - swarm/stateful.md - - swarm/extratips.md - - shared/thankyou.md - - swarm/links.md