diff --git a/lessons/01-welcome/A-introduction.md b/lessons/01-welcome/A-introduction.md index 609a6b7..b512d4d 100644 --- a/lessons/01-welcome/A-introduction.md +++ b/lessons/01-welcome/A-introduction.md @@ -1,6 +1,17 @@ --- -description: +description: >- + Complete Intro to Containers course by Brian Holt aims to demystify + containers, making them accessible to developers regardless of expertise level + in JavaScript. The course covers Linux basics, usage on macOS and Windows, + emphasizing the importance of containers in modern tech environments. keywords: + - containers + - intro + - developers + - Linux basics + - macOS + - Windows + - Brian Holt --- ## Course Objective @@ -54,4 +65,4 @@ And hey, if you could take a second and [star the repo on GitHub][gh] I'd be sup [issue]: https://github.com/btholt/complete-intro-to-containers-v2/issues [project-files]: https://github.com/btholt/projects-for-complete-intro-to-containers-v2 [linux]: https://frontendmasters.com/courses/linux-command-line/ -[sqlitecloud]: https://sqlitecloud.io/ \ No newline at end of file +[sqlitecloud]: https://sqlitecloud.io/ diff --git a/lessons/01-welcome/B-set-up.md b/lessons/01-welcome/B-set-up.md index 1bac6f8..64c0d09 100644 --- a/lessons/01-welcome/B-set-up.md +++ b/lessons/01-welcome/B-set-up.md @@ -1,6 +1,15 @@ --- -description: +description: >- + Learn about Docker Desktop, a convenient desktop app GUI to control Docker on + your computer. Follow installation instructions for Windows, macOS, and Linux + provided in the document. Understand system requirements, internet usage, and + tools used in the course. keywords: + - Docker Desktop + - installation instructions + - system requirements + - internet usage + - tools FAQ --- ## Docker Desktop @@ -63,4 +72,4 @@ The longer answer is that it's likely _most_ of the course would work on somethi [vscode-icons]: https://marketplace.visualstudio.com/items?itemName=vscode-icons-team.vscode-icons [dracula]: https://draculatheme.com/terminal [starship]: https://starship.rs/ -[nerd]: https://www.nerdfonts.com/font-downloads \ No newline at end of file +[nerd]: https://www.nerdfonts.com/font-downloads diff --git a/lessons/02-crafting-containers-by-hand/A-what-are-containers.md b/lessons/02-crafting-containers-by-hand/A-what-are-containers.md index 3b63d0f..13ae4a9 100644 --- a/lessons/02-crafting-containers-by-hand/A-what-are-containers.md +++ b/lessons/02-crafting-containers-by-hand/A-what-are-containers.md @@ -1,4 +1,18 @@ --- +description: >- + Understand the simplicity of containers by exploring how they leverage a few + Linux kernel features for isolation, contrasting with managing bare metal + servers or virtual machines. Discover the advantages and trade-offs associated + with each approach, leading to the emergence of containers as a cost-effective + and efficient solution for deploying code. +keywords: + - containers + - Linux kernel features + - bare metal servers + - virtual machines + - resource management + - security + - deploying code --- Containers are probably simpler than you think they are. Before I took a deep dive into what they are, I was very intimidated by the concept of what containers were. I thought they were for one super-versed in Linux and sysadmin type activties. In reality, the core of what containers are is just a few features of the Linux kernel duct-taped together. Honestly, there's no single concept of a "container": it's just using a few features of Linux together to achieve isolation. That's it. diff --git a/lessons/02-crafting-containers-by-hand/B-chroot.md b/lessons/02-crafting-containers-by-hand/B-chroot.md index 67a9f1b..0757402 100644 --- a/lessons/02-crafting-containers-by-hand/B-chroot.md +++ b/lessons/02-crafting-containers-by-hand/B-chroot.md @@ -1,5 +1,17 @@ --- -title: "chroot" +title: chroot +description: >- + Learn how to use the Linux `chroot` command within containers to set a new + root directory, isolating processes for enhanced security. Follow a + step-by-step guide to create a new environment, copy necessary libraries, and + successfully run commands within the isolated space. +keywords: + - Linux chroot command + - container security + - isolating processes + - copying libraries in chroot + - Ubuntu Docker container + - setting new root directory --- I've heard people call this "cha-root" and "change root". I'm going to stick to "change root" because I feel less ridiculous saying that. It's a Linux command that allows you to set the root directory of a new process. In our container use case, we just set the root directory to be where-ever the new container's new root directory should be. And now the new container group of processes can't see anything outside of it, eliminating our security problem because the new process has no visibility outside of its new root. diff --git a/lessons/02-crafting-containers-by-hand/C-namespaces.md b/lessons/02-crafting-containers-by-hand/C-namespaces.md index 3816e4e..7f7e3d2 100644 --- a/lessons/02-crafting-containers-by-hand/C-namespaces.md +++ b/lessons/02-crafting-containers-by-hand/C-namespaces.md @@ -1,4 +1,17 @@ --- +description: >- + Understand the importance of namespaces and cgroups for security and resource + management in server environments. Learn how namespaces can isolate processes + to enhance security and prevent unauthorized access in shared server + environments, beyond what chroot alone provides. +keywords: + - namespaces + - cgroups + - security + - resource management + - chroot + - process isolation + - server environment --- While chroot is a pretty straightforward, namespaces and cgroups are a bit more nebulous to understand but no less important. Both of these next two features are for security and resource management. diff --git a/lessons/02-crafting-containers-by-hand/D-cgroups.md b/lessons/02-crafting-containers-by-hand/D-cgroups.md index dfe2edb..d5fcdfd 100644 --- a/lessons/02-crafting-containers-by-hand/D-cgroups.md +++ b/lessons/02-crafting-containers-by-hand/D-cgroups.md @@ -1,5 +1,15 @@ --- title: cgroups +description: >- + In the Frontend Masters course "Complete Intro to Containers" taught by Brian Holt, participants learn how to manage server resources on high-traffic shopping days like Black Friday. The course introduces cgroups, a technology developed by Google, which safeguards sites from crashes by limiting resource usage per process, ensuring stability and preventing malicious overloads. This essential tool enhances server efficiency and security in shared environments, enabling robust e-commerce operations. +keywords: + - Frontend Masters Containers + - Brian Holt Containers Course + - cgroups technology + - server resource management + - prevent server crashes + - e-commerce server stability + - Google cgroups implementation --- Okay, so now we've hidden the processes from Eve so Bob and Alice can engage in commerce in privacy and peace. So we're all good, right? They can no longer mess each other, right? Not quite. We're almost there. diff --git a/lessons/03-docker/A-docker-images.md b/lessons/03-docker/A-docker-images.md index f7c3945..7ed50a3 100644 --- a/lessons/03-docker/A-docker-images.md +++ b/lessons/03-docker/A-docker-images.md @@ -1,4 +1,18 @@ --- +description: >- + Learn how to work with Docker images without Docker by unpacking, exporting, + and creating a new isolated environment manually through commands. Understand + the core concepts behind Docker such as namespace isolation, cgroups + limitation, and chroot environment while exploring functionalities like + networking and volumes. +keywords: + - Docker images + - Docker Hub + - container environment + - namespace isolation + - cgroups + - chroot + - environment setup --- These pre-made containers are called _images_. They basically dump out the state of the container, package that up, and store it so you can use it later. So let's go nab one of these image and run it! We're going to do it first without Docker to show you that you actually already knows what's going on. diff --git a/lessons/03-docker/B-docker-images-with-docker.md b/lessons/03-docker/B-docker-images-with-docker.md index 837d1fc..a78afbe 100644 --- a/lessons/03-docker/B-docker-images-with-docker.md +++ b/lessons/03-docker/B-docker-images-with-docker.md @@ -1,4 +1,16 @@ --- +description: >- + Learn how to use Docker to run and interact with container images like Alpine + and Ubuntu, execute commands within containers, manage running containers in + the background, and clean up containers efficiently. +keywords: + - Docker + - container images + - Alpine + - Ubuntu + - running containers + - manage containers + - clean up containers --- ### Docker Images with Docker diff --git a/lessons/03-docker/C-javascript-on-docker.md b/lessons/03-docker/C-javascript-on-docker.md index d03e2aa..5cf2ab7 100644 --- a/lessons/03-docker/C-javascript-on-docker.md +++ b/lessons/03-docker/C-javascript-on-docker.md @@ -1,4 +1,16 @@ --- +description: >- + Learn how to run Node.js, Deno, Bun, and other runtimes in containers using + Docker images. Explore different Linux distros like Debian, Alpine, and CoreOS + for your containerized applications. +keywords: + - Node.js + - Docker + - containers + - Linux distros + - Deno + - Bun + - runtimes --- ## Node.js on Containers diff --git a/lessons/03-docker/D-tags.md b/lessons/03-docker/D-tags.md index c20b18d..80d414b 100644 --- a/lessons/03-docker/D-tags.md +++ b/lessons/03-docker/D-tags.md @@ -1,4 +1,18 @@ --- +description: >- + Learn how to manage Docker container versions, from using the latest tag to + specifying specific versions for Node.js and exploring Alpine Linux for + minimalistic container deployments. Discover the benefits of choosing + lightweight Alpine containers over larger Ubuntu or Debian images for faster + deployment, reduced storage costs, and enhanced security. +keywords: + - Docker containers + - version management + - Alpine Linux + - Node.js + - container deployment + - security + - minimalist containers --- So far we've just been running containers with random tags that I chose. If you run `docker run -it node` the tag implicitly is using the `latest` tag. When you say `docker run -it node`, it's the same as saying `docker run -it node:latest`. The `:latest` is the tag. This allows you to run different versions of the same container, just like you can install React version 17 or React version 18: some times you don't want the latest. Let's say you have a legacy application at your job and it depends on running on Node.js 12 (update your app, Node.js is already past end-of-life) then you can say diff --git a/lessons/03-docker/E-docker-cli.md b/lessons/03-docker/E-docker-cli.md index bd0a293..b325033 100644 --- a/lessons/03-docker/E-docker-cli.md +++ b/lessons/03-docker/E-docker-cli.md @@ -1,5 +1,15 @@ --- -title: "Docker CLI" +title: Docker CLI +description: >- + Explore Docker CLI features like pull, push, inspect, and more. Learn how to + manage containers efficiently with commands such as pause, unpause, exec, + import, export, history, info, top, rm, rmi, logs, restart, and search. +keywords: + - Docker CLI + - container management + - Docker commands + - Docker features + - Docker container operations --- Let's take a look at some more cool features of the Docker CLI. diff --git a/lessons/04-dockerfiles/A-intro-to-dockerfiles.md b/lessons/04-dockerfiles/A-intro-to-dockerfiles.md index fa7c327..cacced0 100644 --- a/lessons/04-dockerfiles/A-intro-to-dockerfiles.md +++ b/lessons/04-dockerfiles/A-intro-to-dockerfiles.md @@ -1,4 +1,16 @@ --- +description: >- + Learn how to build Docker containers with a Dockerfile, the key instructions + involved, and the concept of disposable containers. Discover the power of + creating container images incrementally by leveraging existing images in the + Docker ecosystem. +keywords: + - Docker containers + - Dockerfile + - building containers + - disposable containers + - docker run command + - container versioning --- So far we've been focusing a lot on running containers and haven't much dug into building them. This is on purpose because most of benefit of containers for developers comes from the running of containers. If you learn one thing, it should be how to run them. In fact I'll event venture to say that _most_ developers really only ever need to know how to run them. But you, you're going to learn how to write them. It's an extra superpower. diff --git a/lessons/04-dockerfiles/B-build-a-nodejs-app.md b/lessons/04-dockerfiles/B-build-a-nodejs-app.md index 75331b7..4c23893 100644 --- a/lessons/04-dockerfiles/B-build-a-nodejs-app.md +++ b/lessons/04-dockerfiles/B-build-a-nodejs-app.md @@ -1,5 +1,18 @@ --- -title: "Build a Node.js App" +title: Build a Node.js App +description: >- + Learn how to set up a basic Node.js application inside Docker with detailed + steps on copying files, exposing ports, and user permissions. Enhance your + Dockerfile skills by optimizing file structures and using instructions like + COPY, USER, and WORKDIR effectively. +keywords: + - Dockerfile + - Node.js application + - Docker setup + - copy files in Docker + - expose ports in Docker + - user permissions in Docker + - WORKDIR instruction --- So now let's dig into some more advance things you can do with a Dockerfile. Let's first make our project a real Node.js application. Make a file called `index.js` and put this in there. diff --git a/lessons/04-dockerfiles/C-build-a-more-complicated-nodejs-app.md b/lessons/04-dockerfiles/C-build-a-more-complicated-nodejs-app.md index 55cc8c8..608aa5b 100644 --- a/lessons/04-dockerfiles/C-build-a-more-complicated-nodejs-app.md +++ b/lessons/04-dockerfiles/C-build-a-more-complicated-nodejs-app.md @@ -1,5 +1,17 @@ --- -title: "Build a More Complicated Node.js App" +title: Build a More Complicated Node.js App +description: >- + Learn how to containerize a Node.js app using Fastify, npm, and Docker. Follow + steps for npm installation, Dockerfile creation, and handling permissions + issues within the container. +keywords: + - Node.js + - Fastify + - npm install + - Docker + - containerize + - Dockerfile + - permissions issues --- Okay, all looking good so far. Let's make this app go one step further. Let's have it have an npm install step! In the directory where your app is, put this: diff --git a/lessons/04-dockerfiles/D-a-note-on-expose.md b/lessons/04-dockerfiles/D-a-note-on-expose.md index dc06ef6..8378dab 100644 --- a/lessons/04-dockerfiles/D-a-note-on-expose.md +++ b/lessons/04-dockerfiles/D-a-note-on-expose.md @@ -1,4 +1,13 @@ --- +description: >- + Understanding the usage and limitations of the `EXPOSE` instruction in Docker, + its intended purpose to expose container ports to the host machine, and the + optional `-P` flag for mapping ports to random host ports. Considerations + include documentation benefits and deliberate port mapping. +keywords: + - Docker EXPOSE instruction + - Docker port mapping + - Dockerfile port documentation --- This was a point of confusion for me so I'm going to try to clear it up for you. There is an instruction called `EXPOSE ` that its intended use is to expose ports from within the container to the host machine. However if we don't do the `-p 3000:3000` it still isn't exposed so in reality this instruction doesn't do much. You don't need `EXPOSE`. diff --git a/lessons/04-dockerfiles/E-layers.md b/lessons/04-dockerfiles/E-layers.md index 4670caa..f2fed72 100644 --- a/lessons/04-dockerfiles/E-layers.md +++ b/lessons/04-dockerfiles/E-layers.md @@ -1,4 +1,14 @@ --- +description: >- + Learn how Docker optimizes build processes by reusing cached layers and + rebuilding only what has changed, like with the COPY instruction. Discover + strategies to speed up container-building, such as breaking COPY into multiple + instructions for efficient npm ci runs in Node.js applications. +keywords: + - Docker optimization + - container building + - npm ci optimization + - speed up Docker builds --- Go make any change to your Node.js app. Now re-run your build process. Docker is smart enough to see the your `FROM`, `RUN`, and `WORKDIR` instructions haven't changed and wouldn't change if you ran them again so it uses the same layers it cached from the previous but it can see that your `COPY` is different since files changed between last time and this time, so it begins the build process there and re-runs all instructions after that. Pretty smart, right? This is the same mechanism that Docker uses when you pull a new container to download it in pieces. Each one of those corresponds to a layer. diff --git a/lessons/05-making-tiny-containers/A-alpine-linux.md b/lessons/05-making-tiny-containers/A-alpine-linux.md index 6a16ca3..127c8b7 100644 --- a/lessons/05-making-tiny-containers/A-alpine-linux.md +++ b/lessons/05-making-tiny-containers/A-alpine-linux.md @@ -1,4 +1,15 @@ --- +description: >- + Learn how to make your Node.js app container faster, cheaper, and more secure + by optimizing its size. Reduce vulnerabilities and hosting costs with tips on + minimizing container size using Alpine Linux in Docker. +keywords: + - Node.js + - container optimization + - Alpine Linux + - Docker + - security + - cost-effective hosting --- We've now built a nice little container for our Node.js app and we absolutely could ship it as-is to production. However there's a few things we can do to make things even faster, cheaper, and more secure. diff --git a/lessons/05-making-tiny-containers/B-making-our-own-alpine-nodejs-container.md b/lessons/05-making-tiny-containers/B-making-our-own-alpine-nodejs-container.md index 3a577c7..1a2b71e 100644 --- a/lessons/05-making-tiny-containers/B-making-our-own-alpine-nodejs-container.md +++ b/lessons/05-making-tiny-containers/B-making-our-own-alpine-nodejs-container.md @@ -1,5 +1,16 @@ --- -title: "Making Our Own Alpine Node.js Container" +title: Making Our Own Alpine Node.js Container +description: >- + Learn how to create a custom Node.js Alpine container by installing system + dependencies and setting up a minimal Linux container with Node.js and npm. + Explore steps to optimize the container size and user setup, mirroring + practices from official containers. +keywords: + - Node.js Alpine container + - Dockerfile tutorial + - system dependencies installation + - Alpine Linux setup + - custom container optimization --- ## Making our own Node.js Alpine container diff --git a/lessons/05-making-tiny-containers/C-multi-stage-builds.md b/lessons/05-making-tiny-containers/C-multi-stage-builds.md index ea84651..7f3fd5c 100644 --- a/lessons/05-making-tiny-containers/C-multi-stage-builds.md +++ b/lessons/05-making-tiny-containers/C-multi-stage-builds.md @@ -1,4 +1,13 @@ --- +description: >- + Learn how to optimize Docker images using multistage builds with Node.js and + Alpine, reducing container size significantly by eliminating unnecessary + dependencies like npm. Follow a tutorial on building a Dockerfile with + multiple stages and leveraging Alpine for smaller, more efficient containers. +keywords: + - Docker multistage build + - Node.js Alpine Docker image + - optimize Docker image size --- Hey, we're already half-way to ridiculous, let's make our image EVEN SMALLER. Technically we only need `npm` to build our app, right? We don't actually need it to run our app. Docker allows you to have what it called multistage builds, we it uses one container to build your app and another to run it. This can be useful if you have big dependencies to build your app but you don't need those dependencies to actually run the app. A C++ or Rust app might be a good example of that: they need big tool chains to compile the apps but the resulting binaries are smaller and don't need those tools to actually run them. Or one perhaps more applicable to you is that you don't need the TypeScript or Sass compiler in production, just the compiled files. We'll actually do that here in a sec, but let's start here with eliminating `npm`. diff --git a/lessons/05-making-tiny-containers/D-distroless.md b/lessons/05-making-tiny-containers/D-distroless.md index eb509c2..b9325ec 100644 --- a/lessons/05-making-tiny-containers/D-distroless.md +++ b/lessons/05-making-tiny-containers/D-distroless.md @@ -1,4 +1,16 @@ --- +description: >- + Learn about the differences between Alpine and Distroless for Docker + containers, focusing on edge cases with Alpine and the stripped-down nature of + Distroless. Explore alternative options like Wolfi, Red Hat's Universal Base + Image Micro, and Google's Distroless projects, emphasizing security and + minimalism. +keywords: + - Alpine + - Distroless + - Docker containers + - security + - minimalism --- You may not want to use Alpine. [This blog post goes into depth][blog] but let me sum it up with two points: diff --git a/lessons/05-making-tiny-containers/E-static-asset-project.md b/lessons/05-making-tiny-containers/E-static-asset-project.md index 2b0f0e5..ae83e0e 100644 --- a/lessons/05-making-tiny-containers/E-static-asset-project.md +++ b/lessons/05-making-tiny-containers/E-static-asset-project.md @@ -1,4 +1,17 @@ --- +description: >- + Learn how to build a front end website using Astro, React, TypeScript, and + Tailwind with step-by-step instructions. Create a multi-stage Dockerfile to + build and serve the project with NGINX, simplifying static file serving for + your users. +keywords: + - Astro + - React + - TypeScript + - Tailwind + - Dockerfile + - NGINX + - static assets --- We're going to do a project now! Feel free to attempt the project first and then follow along with me as I code the answer. diff --git a/lessons/06-docker-features/A-bind-mounts.md b/lessons/06-docker-features/A-bind-mounts.md index f93b472..8157f6e 100644 --- a/lessons/06-docker-features/A-bind-mounts.md +++ b/lessons/06-docker-features/A-bind-mounts.md @@ -1,4 +1,17 @@ --- +description: >- + Learn about using volumes and bind mounts in Docker containers to handle + stateful operations, along with the differences between them. Bind mounts + enable flexible file access between the host computer and container, offering + a practical solution for testing or development scenarios. +keywords: + - Docker + - volumes + - bind mounts + - stateful containers + - containerization + - NGINX + - Dockerfile --- So far we've been dealing with self-contained containers. Normally this is all you ever want: containers that can spin up and spin down as frequently as they need to. They're ephemeral, temporary, and disposable. None of these containers are "snowflakes". When I say snowflakes, picture you're running a server that's serving a Wordpress site. Imagine setting up this server, SSH'ing into the server, and setting everything up to be just right and tuned to the exact way you need it. This would be a snowflake server: if someone goes and deletes this server, you're screwed. You have to go and spend a bunch of time re-setting up this server. This is exactly the sort of thing we're trying to avoid with containers. These are the "pet" containers we talked about earlier. We want to make our servers easy to reproduce whenever we want so we can spin up and spin down servers at will. These are the "cattle" containers we talked about. diff --git a/lessons/06-docker-features/B-volumes.md b/lessons/06-docker-features/B-volumes.md index 0dab920..7830b3b 100644 --- a/lessons/06-docker-features/B-volumes.md +++ b/lessons/06-docker-features/B-volumes.md @@ -1,4 +1,13 @@ --- +description: >- + Learn about the differences between bind mounts and volumes in Docker, how to + persist data using volumes for containers, and create a Node.js app with + Docker volumes. Understand the benefits of using volumes over bind mounts in + Docker for data persistence and manageability. +keywords: + - Docker bind mounts vs volumes + - persist data in Docker containers + - create Node.js app with Docker volumes --- Bind mounts are great for when you need to share data between your host and your container as we just learned. Volumes, on the other hand, are so that your containers can maintain state between runs. So if you have a container that runs and the next time it runs it needs the results from the previous time it ran, volumes are going to be helpful. Volumes can not only be shared by the same container-type between runs but also between different containers. Maybe if you have two containers and you want to log to consolidate your logs to one place, volumes could help with that. diff --git a/lessons/06-docker-features/C-dev-containers.md b/lessons/06-docker-features/C-dev-containers.md index a484811..4ef7626 100644 --- a/lessons/06-docker-features/C-dev-containers.md +++ b/lessons/06-docker-features/C-dev-containers.md @@ -1,4 +1,18 @@ --- +description: >- + Learn how to use containers to streamline setting up development environments, + illustrated with a Ruby on Rails example. Explore the benefits of using + Dockerfiles and bind mounts for efficient app development. Discover tools like + DevContainer CLI, Visual Studio, IntelliJ, and GitHub Codespaces that support + dev containers. +keywords: + - containers + - development environments + - Dockerfiles + - bind mounts + - DevContainer CLI + - Visual Studio + - GitHub Codespaces --- So far we've talking about taking an app and using containers to prepare the apps to run. This is an obvious use case for them and one you're going to use a lot. But let's talk about a different use case for them: building development environments for your apps. diff --git a/lessons/06-docker-features/D-networking-with-docker.md b/lessons/06-docker-features/D-networking-with-docker.md index aa52594..ee55c2d 100644 --- a/lessons/06-docker-features/D-networking-with-docker.md +++ b/lessons/06-docker-features/D-networking-with-docker.md @@ -1,4 +1,18 @@ --- +description: >- + Learn how to perform manual networking with Docker, understanding Docker + Compose and Kubernetes roles. Explore connecting a Node.js app to a MongoDB + database using Docker networks. Discover basic networking concepts within + Docker, such as bridge networks, and connect containers through custom + networks. +keywords: + - Docker networking + - manual networking + - Node.js app + - MongoDB database + - bridge networks + - connecting containers + - basic Docker networking --- This is not going to be a deep dive into how networking works. Networking is a deep, deep pool of knowledge and merits entire courses to understand. Just worrying about networking is some people's jobs due to the immense surface area of the subject. Instead, I want to just peek under the covers of how to do manual networking with Docker so you can understand what Docker Compose and Kubernetes do for you. diff --git a/lessons/07-multi-container-projects/A-docker-compose.md b/lessons/07-multi-container-projects/A-docker-compose.md index 663303c..c29d84e 100644 --- a/lessons/07-multi-container-projects/A-docker-compose.md +++ b/lessons/07-multi-container-projects/A-docker-compose.md @@ -1,4 +1,18 @@ --- +description: >- + Learn how to use Docker Compose to coordinate multiple containers for + development environments efficiently. Simplify defining relationships between + containers using a YAML file, making it easy to manage complex setups with one + command. Explore CI/CD integration possibilities and enhance development + productivity by leveraging Docker Compose features. +keywords: + - Docker Compose + - multiple containers + - development environments + - CI/CD scenarios + - YAML file + - containers relationship + - productivity --- This may be one of the most useful features you learn about Docker. We've been mixing various different facets of deploying your app to production and creating development environments. This feature in particular is geared much more for development environments. Many times when you're developing containers you're not in just a single container environment (though that does happen too.) When this happens, you need to coordinate multiple containers when you're doing local dev and you've seen in the previous chapter, networking, that it's possible if a bit annoying. diff --git a/lessons/07-multi-container-projects/B-kubernetes.md b/lessons/07-multi-container-projects/B-kubernetes.md index cd911f7..9c61672 100644 --- a/lessons/07-multi-container-projects/B-kubernetes.md +++ b/lessons/07-multi-container-projects/B-kubernetes.md @@ -1,4 +1,18 @@ --- +description: >- + Learn about containers and Kubernetes, where containers are the building + blocks and Kubernetes orchestrates them. Understand fundamental concepts like + control planes, nodes, pods, services, and deployments. Explore how to set up + Kubernetes using tools like kubectl, minikube, and Docker Desktop for local + development. +keywords: + - containers + - Kubernetes + - orchestration + - control plane + - nodes + - pods + - services --- I like to tell people that containers are the "simple" (simple is a relative term here) part and Kubernetes is the "hard" (hard isn't relative; Kubernetes is really hard) part. So if this feels hard, it's because it is. diff --git a/lessons/07-multi-container-projects/C-kompose.md b/lessons/07-multi-container-projects/C-kompose.md index 0155665..af2cda1 100644 --- a/lessons/07-multi-container-projects/C-kompose.md +++ b/lessons/07-multi-container-projects/C-kompose.md @@ -1,4 +1,17 @@ --- +description: >- + Learn how to use Kompose to convert a docker-compose.yml configuration to + Kubernetes, scale services using Kubernetes, set up LoadBalancer for exposing + services, and interact with Kubernetes cluster using kubectl. Explore + deployment options on Azure AKS, Amazon EKS, and Google GKE. +keywords: + - Kompose + - Kubernetes scaling + - LoadBalancer + - kubectl + - Azure AKS + - Amazon EKS + - Google GKE --- Next tool we're going to use is one called [Kompose][kompose]. I'm showing you this tool because it's how I start out with Kubernetes when I have a project that I want to use with it. Kompose converts a docker-compose.yml configuration to a Kubernetes configuration. I find this to much more approachable than starting with the myriad configurations you need to get Kubernetes going. diff --git a/lessons/08-wrap-up/A-docker-alternatives.md b/lessons/08-wrap-up/A-docker-alternatives.md index a3f2329..63387b8 100644 --- a/lessons/08-wrap-up/A-docker-alternatives.md +++ b/lessons/08-wrap-up/A-docker-alternatives.md @@ -1,3 +1,18 @@ +--- +description: >- + Explore alternatives to Docker for container building, runtime tools, + runtimes, orchestrators, and desktop apps. Learn about tools like Podman, + Buildah, containerd, gVisor, OpenShift, Nomad, and more as options in the + container ecosystem. +keywords: + - Docker alternatives + - container tools + - container runtimes + - orchestration tools + - Podman + - containerd + - Kubernetes alternatives +--- So far we have only talked about Docker and there's a pretty good reason for that: for _personal_ use or _developer_ use, Docker is pretty much the indisputable champion. It has all the developer experience bells and whistles, all the mindshare of developers everywhere, and even all the other tools we are about to talk about like to tout their Docker compatability. However it good to keep in mind that Docker is a for-profit company and thus they are trying to align your incentives to there's and vice versa. It's good to know what else exists out there. I don't have a lot of experience with any of these as I've exclusively used Docker my whole career, but I wanted to get these names out in front of you so you recognize what they are. diff --git a/lessons/08-wrap-up/B-conclusion.md b/lessons/08-wrap-up/B-conclusion.md index f086ef4..925b2b3 100644 --- a/lessons/08-wrap-up/B-conclusion.md +++ b/lessons/08-wrap-up/B-conclusion.md @@ -1,3 +1,19 @@ +--- +description: >- + Congratulations on completing the Complete Intro to Containers, version 2! + This course covers containers, Docker, Kubernetes, and related tools, making + systems-level concepts approachable. Topics include Dockerfiles, container + optimization, networking, Docker Compose, Kubernetes, and more, providing + essential knowledge in today's container-driven workflows. +keywords: + - containers + - Docker + - Kubernetes + - Dockerfiles + - container optimization + - networking + - DevOps +--- That's it Congratulations on completing the Complete Intro to Containers, version 2. On one hand, I feel like this course is pretty dense and a lot of systems-level stuff is thrown at you in a short amount of time. On the other hand, I feel like all of this stuff is actually more approachable than it seems at first impression. I started doing this stuff when I worked at Microsoft because I wanted to be able to sound intelligent when I spoke to the smart people making Azure work and it turns out I really like it. Every since I've always been in and around cloud stuff and it really started with my love for mucking around with containers. Let's review what we talked about: diff --git a/summary/getPrompt.js b/summary/getPrompt.js index 69c7c97..a502f00 100644 --- a/summary/getPrompt.js +++ b/summary/getPrompt.js @@ -1,6 +1,6 @@ export default function getPrompt(content) { return ` - Take the following markdown text and summarize it into one to three sentences. Your goal is to have this description accurately describe the content as well as rank as high as possible in Google search results since your response will be used as the OpenGraph description for this markdown document. Where applicable use keywords that people will search for on Google. In addition, give back an array of keywords that can be used as the OpenGraph keywords that people could use to search for this document. Give one to seven keywords. For the markdown doc you can ignore the images. Return the response in a valid JSON object with the format + Take the following markdown text and summarize it into one to three sentences. Your goal is to have this description accurately describe the content as well as rank as high as possible in Google search results since your response will be used as the OpenGraph description for this markdown document. Where applicable use keywords that people will search for on Google. In addition, give back an array of keywords that can be used as the OpenGraph keywords that people could use to search for this document. Give one to seven keywords. For the markdown doc you can ignore the images. Return the response in a valid JSON object with the format. Do not include the markdown \`\`\`json part, just the valid JSON object. { "description": "", diff --git a/summary/index.js b/summary/index.js index 4f2ce6c..2343fa0 100644 --- a/summary/index.js +++ b/summary/index.js @@ -21,6 +21,7 @@ async function exec() { for (let section of list) { for (let lesson of section.lessons) { await summarize(section, lesson); + console.log("========="); } } } @@ -36,6 +37,7 @@ async function summarize(section, lesson) { } else { try { let res = await api.sendMessage(prompt); + console.log("res", res); const parsed = JSON.parse(res.text); const newData = Object.assign({}, data, parsed);