Skip to content
Merged
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
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.github
.gitignore
.idea
.hugo_build.lock
_releaser
CONTRIBUTING.md
Dockerfile
Expand Down
22 changes: 10 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ ARG GO_VERSION=1.23
# HTMLTEST_VERSION sets the wjdp/htmltest version for HTML testing
ARG HTMLTEST_VERSION=0.17.0
# HUGO_VERSION sets the version of Hugo to build the site with
ARG HUGO_VERSION=0.136.2
ARG HUGO_VERSION=0.136.3

# build-base is the base stage used for building the site
FROM ghcr.io/gohugoio/hugo:v${HUGO_VERSION} AS build-base
USER root
ENV NODE_ENV="production"
RUN --mount=source=package.json,target=package.json \
--mount=source=package-lock.json,target=package-lock.json \
Expand All @@ -26,8 +25,7 @@ FROM build-base AS build
ARG HUGO_ENV="development"
# DOCS_URL sets the base URL for the site
ARG DOCS_URL="https://docs.docker.com"
RUN --mount=type=cache,target=/cache \
hugo --gc --minify -d /out -e $HUGO_ENV -b $DOCS_URL
RUN hugo --gc --minify -e $HUGO_ENV -b $DOCS_URL

# lint lints markdown files
FROM davidanson/markdownlint-cli2:v0.14.0 AS lint
Expand All @@ -41,7 +39,7 @@ RUN --mount=type=bind,target=. \
# test validates HTML output and checks for broken links
FROM wjdp/htmltest:v${HTMLTEST_VERSION} AS test
WORKDIR /test
COPY --from=build /out ./public
COPY --from=build /project/public ./public
ADD .htmltest.yml .htmltest.yml
RUN htmltest

Expand Down Expand Up @@ -76,12 +74,12 @@ ARG UPSTREAM_REPO
ARG UPSTREAM_COMMIT
# HUGO_MODULE_REPLACEMENTS is the replacement module for the upstream project
ENV HUGO_MODULE_REPLACEMENTS="github.com/${UPSTREAM_MODULE_NAME} -> github.com/${UPSTREAM_REPO} ${UPSTREAM_COMMIT}"
RUN hugo --ignoreVendorPaths "github.com/${UPSTREAM_MODULE_NAME}" -d /out
RUN hugo --ignoreVendorPaths "github.com/${UPSTREAM_MODULE_NAME}"

# validate-upstream validates HTML output for upstream builds
FROM wjdp/htmltest:v${HTMLTEST_VERSION} AS validate-upstream
WORKDIR /test
COPY --from=build-upstream /out ./public
COPY --from=build-upstream /project/public ./public
ADD .htmltest.yml .htmltest.yml
RUN htmltest

Expand All @@ -96,9 +94,9 @@ EOT

# path-warnings checks for duplicate target paths
FROM build-base AS path-warnings
RUN hugo --printPathWarnings > /path-warnings.txt
RUN hugo --printPathWarnings > ./path-warnings.txt
RUN <<EOT
DUPLICATE_TARGETS=$(grep "Duplicate target paths" /path-warnings.txt)
DUPLICATE_TARGETS=$(grep "Duplicate target paths" ./path-warnings.txt)
if [ ! -z "$DUPLICATE_TARGETS" ]; then
echo "$DUPLICATE_TARGETS"
echo "You probably have a duplicate alias defined. Please check your aliases."
Expand All @@ -109,7 +107,7 @@ EOT
# pagefind installs the Pagefind runtime
FROM node:alpine${ALPINE_VERSION} AS pagefind
ARG PAGEFIND_VERSION=1.1.1
COPY --from=build /out ./public
COPY --from=build /project/public ./public
RUN --mount=type=bind,src=pagefind.yml,target=pagefind.yml \
npx pagefind@v${PAGEFIND_VERSION} --output-path "/pagefind"

Expand All @@ -121,13 +119,13 @@ COPY --from=pagefind /pagefind .
FROM alpine:${ALPINE_VERSION} AS test-go-redirects
WORKDIR /work
RUN apk add yq
COPY --from=build /out ./public
COPY --from=build /project/public ./public
RUN --mount=type=bind,target=. <<"EOT"
set -ex
./scripts/test_go_redirects.sh
EOT

# release is an empty scratch image with only compiled assets
FROM scratch AS release
COPY --from=build /out /
COPY --from=build /project/public /
COPY --from=pagefind /pagefind /pagefind
4 changes: 4 additions & 0 deletions assets/images/docker-docs-white-condensed.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions content/guides/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ params:
layout: landing
aliases:
- /learning-paths/
- /language/
---

Explore our collection of guides to learn how Docker can optimize your
Expand Down
4 changes: 3 additions & 1 deletion content/manuals/desktop/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ aliases:
- /desktop/settings/mac/
- /desktop/settings/windows/
- /desktop/settings/linux/
weight: 150
weight: 160
---

To navigate to **Settings** either:
Expand Down Expand Up @@ -66,6 +66,8 @@ If you choose the integrated terminal, you can run commands in a running contain
> Turn this setting on to make Docker Desktop run faster.
- Alternatively, you can choose **Apple Virtualization framework**, **QEMU** (for Apple Silicon), or **HyperKit** (for Intel Macs). For macOS 12.5 and later, Apple Virtualization framework is the default setting.

For more information, see [Virtual Machine Manager](/manuals/desktop/vmm.md).

- {{< badge color=blue text="Mac only" >}}**Choose file sharing implementation for your containers**. Choose whether you want to share files using **VirtioFS**, **gRPC FUSE**, or **osxfs (Legacy)**. VirtioFS is only available for macOS 12.5 and later, and is turned on by default.
> [!TIP]
>
Expand Down
57 changes: 57 additions & 0 deletions content/manuals/desktop/vmm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
title: Virtual Machine Manager for Docker Desktop on Mac
linkTitle: Virtual Machine Manager
params:
sidebar:
badge:
color: green
text: New
keywords: virtualization software, resource allocation, mac, docker desktop, vm monitoring, vm performance, apple silicon
description: Discover Docker Desktop for Mac's Virtual Machine Manager (VMM) options, including the new Docker VMM for Apple Silicon, offering enhanced performance and efficiency
weight: 150
---

The Virtual Machine Manager (VMM) in Docker Desktop for Mac is responsible for creating and managing the virtual machine used to run containers. Depending on your system architecture and performance needs, you can choose from multiple VMM options in Docker Desktop's [settings](/manuals/desktop/settings.md#general). This page provides an overview of the available options.

## Docker VMM (Beta)

Docker VMM is a new, container-optimized hypervisor introduced in Docker Desktop 4.35 and available on Apple Silicon Macs only. Its enhanced speed and resource efficiency makes it an ideal choice for optimizing your workflow.

Docker VMM brings exciting advancements specifically tailored for Apple Silicon machines. By optimizing both the Linux kernel and hypervisor layers, Docker VMM delivers significant performance enhancements across common developer tasks.

Some key performance enhancements provided by Docker VMM include:
- Faster I/O operations: With a cold cache, iterating over a large shared filesystem with `find` is 2x faster than when the Apple Virtualization Framework is used.
- Improved caching: With a warm cache, performance can improve by as much as 25x, even surpassing native Mac operations.

These improvements directly impact developers who rely on frequent file access and overall system responsiveness during containerized development. Docker VMM marks a significant leap in speed, enabling smoother workflows and faster iteration cycles.

### Known issues

As Docker VMM is still in Beta, there are a few known limitations:

- Docker VMM does not currently support Rosetta, so emulation of amd64 architectures is slow. Docker is exploring potential solutions.
- Certain databases, like MongoDB and Cassandra, may fail when using virtiofs with Docker VMM. This issue is expected to be resolved in a future release.

## Apple Virtualization Framework

The Apple Virtualization Framework is a stable and well-established option for managing virtual machines on Mac. It has been a reliable choice for many Mac users over the years. This framework is best suited for developers who prefer a proven solution with solid performance and broad compatibility.

## QEMU (Legacy) for Apple Silicon

> [!NOTE]
>
> QEMU will be deprecated in a future release.

QEMU is a legacy virtualization option for Apple Silicon Macs, primarily supported for older use cases.

Docker recommends transitioning to newer alternatives, such as Docker VMM or the Apple Virtualization Framework, as they offer superior performance and ongoing support. Docker VMM, in particular, offers substantial speed improvements and a more efficient development environment, making it a compelling choice for developers working with Apple Silicon.

Note that this is not related to using QEMU to emulate non-native architectures in [multi-platform builds](/manuals/build/building/multi-platform.md#qemu).

## HyperKit (Legacy) for Intel-based Macs

> [!NOTE]
>
> HyperKit will be deprecated in a future release.

HyperKit is another legacy virtualization option, specifically for Intel-based Macs. Like QEMU, it is still available but considered deprecated. Docker recommends switching to modern alternatives for better performance and to future-proof your setup.
5 changes: 4 additions & 1 deletion content/reference/compose-file/services.md
Original file line number Diff line number Diff line change
Expand Up @@ -1221,7 +1221,10 @@ There is a performance penalty for applications that swap memory to disk often.

- `none`: Turns off all container networking.
- `host`: Gives the container raw access to the host's network interface.
- `service:{name}`: Gives the containers access to the specified service only. For more information, see [Container networks](/manuals/engine/network/_index.md#container-networks).
- `service:{name}`: Gives the container access to the specified container by referring to its service name.
- `container:{name}`: Gives the container access to the specified container by referring to its container ID.

For more information container networks, see the [Docker Engine documentation](/manuals/engine/network/_index.md#container-networks).

```yml
network_mode: "host"
Expand Down
4 changes: 3 additions & 1 deletion hugo_stats.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"Docker-Compose",
"Docker-Desktop",
"Docker-Hub",
"Docker-Scout-Dashboard",
"Download",
"Editor-or-IDE",
"Entra-ID",
Expand Down Expand Up @@ -86,6 +87,7 @@
"Node",
"Non-compliant",
"Okta",
"Okta-SAML",
"Old-Dockerfile",
"PHP",
"PowerShell",
Expand Down Expand Up @@ -469,6 +471,7 @@
"self-start",
"shadow",
"shadow-lg",
"sm:block",
"sm:flex",
"sm:flex-row",
"sm:hidden",
Expand All @@ -479,7 +482,6 @@
"space-y-4",
"sticky",
"svg-container",
"svg-icon",
"syntax-light",
"systemd-networkd",
"text-2xl",
Expand Down
25 changes: 24 additions & 1 deletion layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,33 @@
>Legal</a>
</div>
</div>
<div>
<div class="flex justify-between items-center">
<button type="button" id="ot-sdk-btn" class="ot-sdk-show-settings">
Cookies Settings
</button>
<div class="flex items-center gap-2">
<span>Theme:</span>
<button
aria-label="Theme switch"
id="theme-switch"
class="rounded bg-blue-light px-4 py-1 text-white transition
hover:bg-blue-light-400 dark:bg-blue-dark-400
dark:hover:bg-blue-dark"
x-data="{ theme: localStorage.getItem('theme-preference') }"
x-init="$watch('theme', value => {
localStorage.setItem('theme-preference', value);
document.firstElementChild.className = value;
})"
@click="theme = (theme === 'dark' ? 'light' : 'dark')"
>
<span class="icon-svg icon-sm dark:hidden"
>Light {{ partialCached "icon" "light_mode" "light_mode" }}</span
>
<span class="icon-svg icon-sm hidden dark:block"
>Dark {{ partialCached "icon" "dark_mode" "dark_mode" }}</span
>
</button>
</div>
</div>
</div>
</div>
14 changes: 4 additions & 10 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@
<div>
{{/* main logo */}}
<a title="Docker Docs home page" href="{{ site.BaseURL }}">
<div>
<div class="hidden sm:block">
{{- (resources.Get "images/docker-docs-white.svg").Content | safe.HTML -}}
</div>
<div class="block sm:hidden">
{{- (resources.Get "images/docker-docs-white-condensed.svg").Content | safe.HTML -}}
</div>
</a>
</div>
<nav class="mt-1 hidden md:block">
Expand All @@ -37,15 +40,6 @@
<span>Ask&nbsp;AI</span>
<img src="{{ (resources.Get "images/ai-stars.svg").Permalink }}" alt="AI Stars" />
</button>
<button aria-label="Theme switch" id="theme-switch" class="svg-icon"
x-data="{ theme: localStorage.getItem('theme-preference') }" x-init="$watch('theme', value => {
localStorage.setItem('theme-preference', value);
document.firstElementChild.className = value;
})" @click="theme = (theme === 'dark' ? 'light' : 'dark')">
<span class="icon-svg dark:hidden">{{ partialCached "icon" "light_mode" "light_mode"}}</span>
<span class="icon-svg hidden dark:block">{{ partialCached "icon" "dark_mode" "dark_mode"}}</span>
</button>
</div>
</div>

</header>
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ publish = "public"
[context.deploy-preview.environment]
NODE_VERSION = "20"
NODE_ENV = "production"
HUGO_VERSION = "0.136.2"
HUGO_VERSION = "0.136.3"
HUGO_ENABLEGITINFO = "true"
HUGO_ENVIRONMENT = "preview"

Expand Down
Loading