Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ Here's what makes them awesome. Containers are:
- Independent. Each container is independently managed. Deleting one container won't affect any others.
- Portable. Containers can run anywhere! The container that runs on your development machine will work the same way in a data center or anywhere in the cloud!

![Diagram showing three containers (frontend, backend, database) running side by side, each with an isolated filesystem, all sharing the host OS kernel](images/container-architecture.png)

### Containers versus virtual machines (VMs)

Without getting too deep, a VM is an entire operating system with its own kernel, hardware drivers, programs, and applications. Spinning up a VM only to isolate a single application is a lot of overhead.
Expand All @@ -43,6 +45,8 @@ A container is simply an isolated process with all of the files it needs to run.
>
> Quite often, you will see containers and VMs used together. As an example, in a cloud environment, the provisioned machines are typically VMs. However, instead of provisioning one machine to run one application, a VM with a container runtime can run multiple containerized applications, increasing resource utilization and reducing costs.

![Diagram comparing virtual machines (each with a full Guest OS) versus containers (sharing the host kernel with no Guest OS overhead)](images/containers-vs-vms.png)

Comment on lines 36 to +49
Copy link

Copilot AI May 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is described/titled as a fix to Compose healthcheck examples, but this file adds new diagrams to the container concepts page. Please split these doc+asset additions into a separate PR (or update the PR title/description) so the change set matches the stated intent and is easier to review.

Copilot uses AI. Check for mistakes.

## Try it out

Expand Down
2 changes: 1 addition & 1 deletion content/manuals/compose/how-tos/lifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ services:
volumes:
- data:/data
post_start:
- command: chown -R /data 1001:1001
- command: chown -R 1001:1001 /data
user: root
Comment on lines 44 to 46
Copy link

Copilot AI May 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is described/titled as a fix to Compose healthcheck examples, but this change updates the lifecycle hooks doc example (chown argument order). Consider moving this to a separate PR (or updating the PR title/description) to keep the scope aligned and ease review/rollback.

Copilot uses AI. Check for mistakes.

volumes:
Expand Down
4 changes: 2 additions & 2 deletions content/reference/compose-file/services.md
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,7 @@ For more information on `HEALTHCHECK`, see the [Dockerfile reference](/reference

```yml
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost"]
test: ["CMD-SHELL", "curl -f http://localhost || exit 1"]
interval: 1m30s
timeout: 10s
retries: 3
Expand All @@ -1085,7 +1085,7 @@ If it's a string, it's equivalent to specifying `CMD-SHELL` followed by that str

```yml
# Hit the local web app
test: ["CMD", "curl", "-f", "http://localhost"]
test: ["CMD-SHELL", "curl -f http://localhost || exit 1"]
```

Using `CMD-SHELL` runs the command configured as a string using the container's default shell
Expand Down
Loading