Merge pull request #20608 from dvdksn/callouts-render-hook

hugo: use render hooks for blockquotes (callouts/alerts)
This commit is contained in:
David Karlsson 2024-08-16 10:45:03 +02:00 committed by GitHub
commit cabff85f2e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
502 changed files with 1119 additions and 1452 deletions

View File

@ -16,7 +16,7 @@
"ol-prefix": {"style": "ordered"},
"no-reversed-links": true,
"reference-links-images": {
"shortcut_syntax": true
"shortcut_syntax": false
},
"fenced-code-language": true,
"table-pipe-style": true,

View File

@ -1,70 +0,0 @@
/* callouts = blockquotes with classes
*
* Note: the left border is set using a custom property
* in tailwind.config.js
*
* */
@layer components {
.prose blockquote {
@apply bg-blue-light-100 px-6 py-4 font-normal not-italic dark:bg-blue-dark-100;
quotes: none;
> *:first-child {
@apply relative ml-6 mt-0;
&:before {
@apply bg-black dark:bg-white;
position: absolute;
display: block;
margin-left: -24px;
margin-top: 4px;
width: 20px;
height: 20px;
mask-image: url('/icons/info-fill.svg');
-webkit-mask-image: url('/icons/info-fill.svg');
mask-repeat: no-repeat;
mask-size: cover;
}
}
*:last-child {
@apply mb-0 after:content-none;
}
&.warning {
@apply border-l-red-light bg-red-light-100 dark:border-l-red-dark dark:bg-red-dark-100;
> *:first-child:before {
mask-image: url('/icons/dangerous-fill.svg');
-webkit-mask-image: url('/icons/dangerous-fill.svg');
}
}
&.important {
@apply border-l-amber-light bg-amber-light-100 dark:border-l-amber-dark dark:bg-amber-dark-100;
> *:first-child:before {
mask-image: url('/icons/warning-fill.svg');
-webkit-mask-image: url('/icons/warning-fill.svg');
}
}
&.tip {
@apply border-l-green-light bg-green-light-100 dark:border-l-green-dark dark:bg-green-dark-100;
> *:first-child:before {
mask-image: url('/icons/lightbulb-fill.svg');
-webkit-mask-image: url('/icons/lightbulb-fill.svg');
}
}
&.experimental {
> *:first-child:before {
mask-image: url('/icons/science-fill.svg');
-webkit-mask-image: url('/icons/science-fill.svg');
}
}
&.restricted {
@apply border-l-violet-light bg-violet-light-100 dark:border-l-violet-dark dark:bg-violet-dark-100;
> *:first-child:before {
mask-image: url('/icons/rocket_launch-fill.svg');
-webkit-mask-image: url('/icons/rocket_launch-fill.svg');
}
}
}
}

View File

@ -8,7 +8,6 @@
@import "tailwindcss/components";
@import "/assets/css/code";
@import "/assets/css/toc";
@import "/assets/css/callouts";
@import "/assets/css/kapa";
@import "tailwindcss/utilities";

View File

@ -29,4 +29,4 @@ You can create a Docker account to secure a Docker ID, which is a username for y
In this section, explore how you can create, manage, or update your account.
{{< grid >}}
{{< grid >}}

View File

@ -12,10 +12,9 @@ You can create a free Docker account with your email address or by signing up wi
Your Docker ID becomes your username for hosted Docker services, and [Docker forums](https://forums.docker.com/).
> **Tip**
> [!TIP]
>
> Explore [Docker's core subscriptions](https://www.docker.com/pricing/) to see what else Docker can offer you.
{ .tip }
## Create a Docker ID
@ -37,16 +36,15 @@ Your Docker ID becomes your username for hosted Docker services, and [Docker for
6. Verify your email address to complete the registration process.
> **Note**
> [!NOTE]
>
> You have limited actions available until you verify your email address.
### Sign up with Google or GitHub
> **Important**
> [!IMPORTANT]
>
> To sign up with your social provider, make sure you verify your email address with your provider before you begin.
{ .important }
1. Go to the [Docker sign-up page](https://app.docker.com/signup/).
@ -68,20 +66,18 @@ Once you register and verify your Docker ID email address, you can sign in to [y
You can also sign in through the CLI using the `docker login` command. For more information, see [`docker login`](../reference/cli/docker/login.md).
> **Warning**
> [!WARNING]
>
> When you use the `docker login` command, your credentials are
stored in your home directory in `.docker/config.json`. The password is base64-encoded in this file.
>
> We recommend using one of the [Docker credential helpers](https://github.com/docker/docker-credential-helpers) for secure storage of passwords. For extra security, you can also use a [personal access token](../security/for-developers/access-tokens.md) to log in instead, which is still encoded in this file (without a Docker credential helper) but doesn't allow admin actions (such as changing the password).
{ .warning }
### Sign in with your social provider
> **Important**
> [!IMPORTANT]
>
> To sign in with your social provider, make sure you verify your email address with your provider before you begin.
{ .important }
Optionally, you can sign in to an existing Docker account with your Google or GitHub account. If a Docker account exists with the same email address as the primary email for your social provider, your Docker account will automatically be linked to the social profile. This lets you sign in with your social provider.

View File

@ -9,7 +9,6 @@ You can deactivate an account at any time. This section describes the prerequisi
>**Warning**
>
> All Docker products and services that use your Docker account will be inaccessible after deactivating your account.
{ .warning }
## Prerequisites
@ -38,13 +37,12 @@ Before deactivating your Docker account, ensure that you meet the following requ
Once you have completed all the previous steps, you can deactivate your account.
> **Warning**
> [!WARNING]
>
> This cannot be undone. Be sure you've gathered all the data you need from your account before deactivating it.
{ .warning }
1. Sign in to your [Docker account](https://app.docker.com/login).
2. In Docker Home, select your avatar in the top-right corner to open the drop-down.
3. Select **Account settings**.
4. In the **Account management** section, select **Deactivate account** to open to deactivate account page.
5. To confirm, select **Deactivate account**.
5. To confirm, select **Deactivate account**.

View File

@ -6,10 +6,9 @@ title: Manage your Docker account
You can centrally manage the settings for your Docker account. Here you can also take administrative actions for your account and manage your account security.
> **Tip**
> [!TIP]
>
> If your account is associated with an organization that enforces single sign-on (SSO), you may not have permissions to update your account settings. You need to contact your administrator to update your settings.
{ .tip }
## Update general settings
@ -65,4 +64,4 @@ You can take administrative actions for your account in Docker Home.
For more information on converting your account, see [Convert an account into an organization](../admin/convert-account.md).
For information on deactivating your account, see [Deactivating a user account](./deactivate-user-account.md).
For information on deactivating your account, see [Deactivating a user account](./deactivate-user-account.md).

View File

@ -44,4 +44,4 @@ The Docker Admin Console is available in [Early Access](../release-lifecycle.md#
- Team: A team is a group of Docker members that belong to an organization. Organization and company owners can group members into additional teams to configure repository permissions on a per-team basis. Using teams to group members is optional.
- Member: A member is a Docker user that's a member of an organization. Organization and company owners can assign roles to members to define their permissions.
{{< grid >}}
{{< grid >}}

View File

@ -45,4 +45,4 @@ aliases:
Learn how to administer a company in the following sections.
{{< grid >}}
{{< grid >}}

View File

@ -21,10 +21,9 @@ To create a new company:
3. Near the bottom of the **General** tab, select **Create a company**.
4. Enter a unique name for your company, then select **Continue**.
> **Tip**
> [!TIP]
>
> The name for your company can't be the same as an existing user, organization, or company namespace.
{ .tip }
5. Review the company migration details and then select **Create company**.
@ -43,10 +42,9 @@ To create a new company:
3. Select **Create a company**.
4. Enter a unique name for your company, then select **Continue**.
> **Tip**
> [!TIP]
>
> The name for your company can't be the same as an existing user, organization, or company namespace.
{ .tip }
5. Review the company migration details and then select **Create company**.

View File

@ -20,14 +20,12 @@ You can manage the organizations in a company in Docker Hub and the Docker Admin
>**Important**
>
> You must be a company owner to add an organization to a company. You must also be an organization owner of the organization you want to add.
{ .important }
There is no limit to the number of organizations you can have under a company layer. All organizations must have a Business subscription.
>**Important**
>
> Once you add an organization to a company, you can't remove it from the company.
{ .important }
1. In Docker Hub, select **Organizations**.
2. Select your company.
@ -60,14 +58,12 @@ When you have a [self-serve](../../subscription/core-subscription/details.md#sel
>**Important**
>
> You must be a company owner to add an organization to a company. You must also be an organization owner of the organization you want to add.
{ .important }
There is no limit to the number of organizations you can have under a company layer. All organizations must have a Business subscription.
>**Important**
>
> Once you add an organization to a company, you can't remove it from the company.
{ .important }
1. Sign in to the [Admin Console](https://admin.docker.com).
2. In the left navigation, select your company in the drop-down menu.

View File

@ -50,4 +50,4 @@ Once you've added the new owner, you can view the user in the **Company owners**
5. Select **Remove as company owner**.
{{< /tab >}}
{{< /tabs >}}
{{< /tabs >}}

View File

@ -10,10 +10,9 @@ You can convert an existing user account to an organization. This is useful if y
When you convert a user account to an organization, the account is migrated to a Docker Team plan.
> **Important**
> [!IMPORTANT]
>
> Once you convert your account to an organization, you cant revert it to a user account.
{ .important }
## Prerequisites

View File

@ -11,7 +11,6 @@ You can deactivate an account at any time. This section describes the prerequisi
>**Warning**
>
> All Docker products and services that use your Docker account or organization account will be inaccessible after deactivating your account.
{ .warning }
## Prerequisites
@ -32,10 +31,9 @@ Before deactivating an organization, complete the following:
Once you have completed all the previous steps, you can deactivate your organization.
> **Warning**
> [!WARNING]
>
> This cannot be undone. Be sure you've gathered all the data you need from your organization before deactivating it.
{ .warning }
{{< tabs >}}
{{< tab name="Admin Console" >}}

View File

@ -17,7 +17,7 @@ For example, activity logs display activities such as the date when a repository
Owners can also see the activity logs for their repository if the repository is part of the organization subscribed to a Docker Business or Team plan.
> **Note**
> [!NOTE]
>
> Activity logs requires a [Docker Team or Business subscription](../../../subscription/_index.md).

View File

@ -99,7 +99,7 @@ you automatically have "Read-only" permissions:
| Trigger Builds | ❌ | ✅ | ✅ |
| Edit Build Settings | ❌ | ❌ | ✅ |
> **Note**
> [!NOTE]
>
> A user who hasn't verified their email address only has
> `Read-only` access to the repository, regardless of the rights their team

View File

@ -40,12 +40,12 @@ To add a member to a team:
2. Select **Organizations**, your organization, and then **Members**.
3. Select the **Action** icon, and then select **Add to team**.
> **Note**
> [!NOTE]
>
> You can also navigate to **Organizations** > **Your Organization** > **Teams** > **Your Team Name** and select **Add Member**. Select a member from the drop-down list to add them to the team or search by Docker ID or email.
4. Select the team and then select **Add**.
> **Note**
> [!NOTE]
>
> An invitee must first accept the invitation to join the organization before being added to the team.
@ -60,7 +60,7 @@ To add a member to a team:
2. Select the team name.
3. Select **Add member**. You can add the member by searching for their email address or username.
> **Note**
> [!NOTE]
>
> An invitee must first accept the invitation to join the organization before being added to the team.

View File

@ -30,7 +30,7 @@ To create an organization:
[Docker Pricing](https://www.docker.com/pricing/)
for details on the features offered in the Team and Business plan.
> **Note**
> [!NOTE]
>
> Selecting **Buy Now** isn't an obligation to pay. You can complete
> this step without incurring a payment.
@ -39,7 +39,7 @@ for details on the features offered in the Team and Business plan.
your organization in Docker Hub. It's not possible to change the name of the
organization after you've created it.
> **Note**
> [!NOTE]
>
> You can't use the same name for the organization and your Docker ID. If you want to use your Docker ID as the organization name, then you must first [convert your account into an organization](../convert-account.md).
@ -63,7 +63,7 @@ To view an organization:
1. Sign in to Docker Hub with a user account that is a member of any team in the
organization.
> **Note**
> [!NOTE]
>
> You can't _directly_ log in to an organization. This is especially
> important to note if you create an organization by
@ -114,11 +114,10 @@ If you have multiple organizations that you want to merge into one, complete the
3. Manually move over your data, including all repositories.
4. Once you're done moving all of your users and data, [downgrade](../../subscription/core-subscription/downgrade.md) the secondary account to a free subscription.
> **Tip**
> [!TIP]
>
> If your organization has a Docker Core Business subscription with a purchase order, contact Support or your Account Manager at Docker.
>
{ .tip }
## More resources

View File

@ -4,7 +4,7 @@ description: Learn about 3D Secure support for Docker billing.
keywords: billing, renewal, payments, subscriptions
---
> **Note**
> [!NOTE]
>
> [Docker Core subscription](/billing/core-billing/get-started-core/) payments support 3D secure authentication.
@ -25,7 +25,6 @@ If you encounter errors completing payments due to 3DS, you can troubleshoot in
2. Contact your bank to determine any errors on their end.
3. Try a different payment method that doesnt require 3DS.
> **Tip**
> [!TIP]
>
> Make sure you allow third-party scripts in your browser and that any ad blocker you may use is disabled when attempting to complete payments.
{ .tip }

View File

@ -8,10 +8,9 @@ Build Cloud is a next-gen build tool that enables improved build speed, a shared
If you dont have a Docker Core subscription, you can buy Docker Build Cloud Team and create a team in Docker Build Cloud.
> **Tip**
> [!TIP]
>
> You can create a free Docker Personal account and [try Docker Build Cloud for free](/subscription/build-cloud/build-details#docker-personal). Team benefits aren't included.
{ .tip }
In this section, learn how to set up and manage billing for your Build Cloud subscription. For more information about the subscription tiers, see [Build Cloud subscriptions and features](/subscription/build-cloud/build-details). To buy Docker Build Cloud Business, [contact sales](https://www.docker.com/products/build-cloud/#contact_sales).
@ -33,7 +32,7 @@ Subscription renewals charge to the default payment method.
You can buy a Docker Build Cloud Team subscription if you havent created an organization yet. To do so, you can create a team in Docker Build Cloud.
> **Note**
> [!NOTE]
>
> To create a new organization and start a Docker Build Cloud Team subscription, you need a personal Docker account. You can [sign up](https://hub.docker.com/signup) for free.

View File

@ -26,7 +26,7 @@ When you change the billing cycle's duration:
## Organization
> **Note**
> [!NOTE]
>
> You must be an organization owner to make changes to the payment information.

View File

@ -10,10 +10,9 @@ aliases:
You can update the billing information for your personal account or for an organization. When you update your billing information, these changes apply to future billing invoices.
> **Important**
> [!IMPORTANT]
>
> You can't update an existing invoice, including paid and unpaid invoices.
{ .important }
The billing information provided appears on all your billing invoices. The email address provided is where Docker sends all invoices and other [billing-related communication](#update-your-email-address-that-receives-billing-invoices).
@ -29,7 +28,7 @@ The billing information provided appears on all your billing invoices. The email
### Organization
> **Note**
> [!NOTE]
>
> You must be an organization owner to make changes to the billing information.

View File

@ -69,7 +69,7 @@ From here you can download an invoice.
### Organization
> **Note**
> [!NOTE]
>
> You must be an owner of the organization to view the billing history.

View File

@ -42,7 +42,7 @@ All currency, for example the amount listed on your billing invoice, is in Unite
### Organization
> **Note**
> [!NOTE]
>
> You must be an organization owner to make changes to the payment information.

View File

@ -8,7 +8,7 @@ Docker Scout lets users secure their software supply chain and continuously obse
In this section, learn how to buy and manage a Docker Scout Team subscription for your personal account or for an organization. If you're an organization with multiple teams, a Docker Scout Business plan may be better. To buy Docker Scout Business, [contact sales](https://www.docker.com/products/docker-scout/#contact-sales).
> **Note**
> [!NOTE]
>
> You need to be an owner to manage billing for an organization.
>
@ -57,7 +57,7 @@ To remove repositories:
The number of repositories updates on your next billing cycle.
> **Note**
> [!NOTE]
>
> You can't add repositories while repository removal is pending. You can add repositories again during the next billing cycle.
>
@ -66,11 +66,10 @@ The number of repositories updates on your next billing cycle.
You can downgrade from Docker Scout Team or Docker Scout Business to a Docker Scout Free subscription at anytime before the renewal date. Your subscription features remain available until the end of your billing cycle.
> **Tip**
> [!TIP]
>
> To downgrade from Docker Scout Business to Docker Scout Team, [contact](https://hub.docker.com/support/contact) your account manager to cancel so you can start a Docker Scout Team subscription.
>
{ .tip }
1. Go to [Billing settings](https://scout.docker.com/settings/billing) in the Docker Scout Dashboard.
2. Find your Docker Scout plan, then select **Change plan**.

View File

@ -32,10 +32,9 @@ Palo Alto, CA 94306
2. Enter the required information.
3. In the **Additional Information** field, list the Docker ID/namespace(s) of the accounts that you want to apply the tax exemption certificate to.
> **Tip**
> [!TIP]
>
> You can list multiple namespaces that share the same tax exemption certificate, if applicable.
{ .tip }
4. Add the tax certificate from your system by dragging and dropping them onto the file area, or select the **Browse Files** button to open a file dialog.
5. Select **Submit**.

View File

@ -40,7 +40,7 @@ isolated to a single Amazon EC2 instance, with a dedicated EBS volume for build
cache, and encryption in transit. That means there are no shared processes or
data between cloud builders.
> **Note**
> [!NOTE]
>
> Docker Build Cloud is currently only available in the US East region. Users
> in Europe and Asia may experience increased latency compared to users based

View File

@ -25,7 +25,7 @@ build cache or build without tagging the image. When you use Docker Build Cloud,
Buildx automatically loads the build result if you build a tagged image.
See [Loading build results](./usage/#loading-build-results) for details.
> **Note**
> [!NOTE]
>
> Builds on Docker Build Cloud have a timeout limit of two hours. Builds that
> run for longer than two hours are automatically cancelled.
@ -33,7 +33,7 @@ See [Loading build results](./usage/#loading-build-results) for details.
{{< tabs >}}
{{< tab name="GitHub Actions" >}}
> **Note**
> [!NOTE]
>
> Version 4.0.0 and later of `docker/build-push-action` and
> `docker/bake-action` builds images with [provenance attestations by

View File

@ -54,7 +54,7 @@ buildx build`, without discrepancies.
To build with Docker Build Cloud using `docker compose build`, first set the
cloud builder as your selected builder, then run your build.
> **Note**
> [!NOTE]
>
> Make sure you're using a supported version of Docker Compose, see
> [Prerequisites](setup.md#prerequisites).
@ -138,14 +138,13 @@ such as authentication credentials or tokens,
use the `--secret` and `--ssh` CLI flags for the `docker buildx` command.
The traffic is encrypted and secrets are never stored in the build cache.
> **Warning**
> [!WARNING]
>
> If you're misusing build arguments to pass credentials, authentication
> tokens, or other secrets, you should refactor your build to pass the secrets using
> [secret mounts](/reference/cli/docker/buildx/build.md#secret) instead.
> Build arguments are stored in the cache and their values are exposed through attestations.
> Secret mounts don't leak outside of the build and are never included in attestations.
{.warning}
For more information, refer to:
@ -165,11 +164,10 @@ To clear the builder's cache manually,
use the [`docker buildx prune` command](/reference/cli/docker/buildx/prune/).
This works like pruning the cache for any other builder.
> **Warning**
> [!WARNING]
>
> Pruning a cloud builder's cache also removes the cache for other team members
> using the same builder.
{ .warning }
## Unset Docker Build Cloud as the default builder
@ -196,4 +194,3 @@ including OCI registries, must be accessible over the internet.
>We are currently testing an experimental feature which lets cloud builders access internal resources.
>
> If you're interested in trying this feature, contact us using the [Support form](https://hub.docker.com/support/contact?topic=Docker+Build+Cloud&subject=Private+registry+access).
{ .tip }

View File

@ -47,7 +47,7 @@ You can opt in to add either the SBOM or provenance attestation type, or both.
$ docker buildx build --sbom=true --provenance=true .
```
> **Note**
> [!NOTE]
>
> The default image store doesn't support attestations. If you're using the
> default image store and you build an image using the default `docker` driver,
@ -60,7 +60,7 @@ $ docker buildx build --sbom=true --provenance=true .
> a registry directly.
> - Enable the [containerd image store](../../desktop/containerd.md).
> **Note**
> [!NOTE]
>
> Provenance attestations are enabled by default, with the `mode=min` option.
> You can disable provenance attestations using the `--provenance=false` flag,

View File

@ -188,10 +188,9 @@ $ docker buildx imagetools inspect <namespace>/<image>:<version> \
}
```
> **Tip**
> [!TIP]
>
> If the image is multi-platform, you can check the SBOM for a platform-specific index using `--format '{{ json (index .SBOM "linux/amd64").SPDX }}'`.
{ .tip }
You can also construct more complex expressions using the full functionality
of Go templates. For example, you can list all the installed packages and their
@ -223,11 +222,10 @@ an image that implements the
$ docker buildx build --attest type=sbom,generator=<image> .
```
> **Tip**
> [!TIP]
>
> The Docker Scout SBOM generator is available. See
> [Docker Scout SBOMs](/scout/how-tos/view-create-sboms.md).
{ .tip }
## SBOM attestation example

View File

@ -138,7 +138,7 @@ well as:
When possible, you should prefer `mode=max` as it contains significantly more
detailed information for analysis.
> **Warning**
> [!WARNING]
>
> Note that `mode=max` exposes the values of
> [build arguments](../../reference/cli/docker/buildx/build.md#build-arg).
@ -147,7 +147,6 @@ detailed information for analysis.
> tokens, or other secrets, you should refactor your build to pass the secrets using
> [secret mounts](../../reference/cli/docker/buildx/build.md#secret) instead.
> Secret mounts don't leak outside of the build and are never included in provenance attestations.
{.warning}
## Inspecting Provenance

View File

@ -5,11 +5,12 @@ aliases:
- /build/customize/bake/
---
> **Experimental**
>
> Bake is an experimental feature, and we are looking for
> [feedback from users](https://github.com/docker/buildx/issues).
{ .experimental }
{{% experimental %}}
Bake is an experimental feature, and we are looking for
[feedback from users](https://github.com/docker/buildx/issues).
{{% /experimental %}}
Bake is a feature of Docker Buildx that lets you define your build configuraton
using a declarative file, as opposed to specifying a complex CLI expression. It

View File

@ -120,7 +120,7 @@ $ docker buildx bake --print
}
```
> **Note**
> [!NOTE]
>
> System environment variables take precedence over environment variables
> in `.env` file.

View File

@ -36,7 +36,7 @@ Annotations are not to be confused with [attestations]:
You can add annotations to an image at build-time, or when creating the image
manifest or index.
> **Note**
> [!NOTE]
>
> The Docker Engine image store doesn't support loading images with
> annotations. To build with annotations, make sure to push the image directly

View File

@ -460,7 +460,7 @@ build from inadvertently succeeding. For example:
RUN set -o pipefail && wget -O - https://some.site | wc -l > /number
```
> **Note**
> [!NOTE]
>
> Not all shells support the `-o pipefail` option.
>
@ -743,7 +743,7 @@ like the following example:
RUN groupadd -r postgres && useradd --no-log-init -r -g postgres postgres
```
> **Note**
> [!NOTE]
>
> Consider an explicit UID/GID.
>
@ -751,7 +751,7 @@ RUN groupadd -r postgres && useradd --no-log-init -r -g postgres postgres
> the "next" UID/GID is assigned regardless of image rebuilds. So, if its
> critical, you should assign an explicit UID/GID.
> **Note**
> [!NOTE]
>
> Due to an [unresolved bug](https://github.com/golang/go/issues/13548) in the
> Go archive/tar package's handling of sparse files, attempting to create a user

View File

@ -288,7 +288,7 @@ $ GIT_AUTH_TOKEN=<token> docker buildx build \
https://github.com/user/private.git
```
> **Note**
> [!NOTE]
>
> Don't use `--build-arg` for secrets.
@ -512,7 +512,7 @@ A preprocessing step uses Go's
to trim whitespace and remove `.` and `..`.
Lines that are blank after preprocessing are ignored.
> **Note**
> [!NOTE]
>
> For historical reasons, the pattern `.` is ignored.

View File

@ -72,7 +72,7 @@ automatically detects the secondary architectures that are available. When
BuildKit needs to run a binary for a different architecture, it automatically
loads it through a binary registered in the `binfmt_misc` handler.
> **Note**
> [!NOTE]
>
> Emulation with QEMU can be much slower than native builds, especially for
> compute-heavy tasks like compilation and compression or decompression.
@ -258,7 +258,7 @@ $ docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t <userna
#16 DONE 5.6s
```
> **Note**
> [!NOTE]
>
> * `<username>` must be a valid Docker ID and `<image>` and valid repository on
> Docker Hub.

View File

@ -42,7 +42,7 @@ Refer to the
[`docker build` CLI reference](../../reference/cli/docker/buildx/build.md#file)
to learn about the `--file` flag.
> **Note**
> [!NOTE]
>
> We recommend using the default (`Dockerfile`) for your project's primary
> Dockerfile.
@ -122,12 +122,11 @@ your Dockerfile, and should be the first line in Dockerfiles.
# syntax=docker/dockerfile:1
```
> **Tip**
> [!TIP]
>
> We recommend using `docker/dockerfile:1`, which always points to the latest
> release of the version 1 syntax. BuildKit automatically checks for updates of
> the syntax before building, making sure you are using the most current version.
{ .tip }
### Base image
@ -168,7 +167,7 @@ Dockerfiles begin with the `#` symbol. As your Dockerfile evolves, comments can
be instrumental to document how your Dockerfile works for any future readers
and editors of the file, including your future self!
> **Note**
> [!NOTE]
>
> You might've noticed that comments are denoted using the same symbol as the
> [syntax directive](#dockerfile-syntax) on the first line of the file.

View File

@ -11,14 +11,13 @@ In Docker Build, build arguments (`ARG`) and environment variables (`ENV`)
both serve as a means to pass information into the build process.
You can use them to parameterize the build, allowing for more flexible and configurable builds.
> **Warning**
> [!WARNING]
>
> Build arguments and environment variables are inappropriate for passing secrets
> to your build, because they're exposed in the final image. Instead, use
> secret mounts or SSH mounts, which expose secrets to your builds securely.
>
> See [Build secrets](./secrets.md) for more information.
{ .warning }
## Similarities and differences

View File

@ -86,7 +86,7 @@ command, run:
$ DOCKER_BUILDKIT=1 docker build .
```
> **Note**
> [!NOTE]
>
> [Buildx](../architecture.md#buildx) always uses BuildKit.
@ -107,12 +107,11 @@ daemon.
## BuildKit on Windows
> **Warning**
> [!WARNING]
>
> BuildKit only fully supports building Linux containers.
> Windows container support is experimental, and is tracked in
> [`moby/buildkit#616`](https://github.com/moby/buildkit/issues/616).
{ .warning }
BuildKit has experimental support for Windows containers (WCOW) as of version 0.13.
This section walks you through the steps for trying it out.
@ -133,7 +132,7 @@ We appreciate any feedback you submit by [opening an issue here](https://github.
### Steps
> **Note**
> [!NOTE]
>
> The following commands require administrator (elevated) privileges in a PowerShell terminal.
@ -188,7 +187,7 @@ We appreciate any feedback you submit by [opening an issue here](https://github.
7. In another terminal with administrator privileges, create a remote builder that uses the local BuildKit daemon.
> **Note**
> [!NOTE]
>
> This requires Docker Desktop version 4.29 or later.

View File

@ -23,7 +23,7 @@ defining a mirror for `docker.io` (Docker Hub) to `mirror.gcr.io`.
mirrors = ["mirror.gcr.io"]
```
> **Note**
> [!NOTE]
>
> `debug = true` turns on debug requests in the BuildKit daemon, which logs a
> message that shows when a mirror is being used.

View File

@ -21,14 +21,13 @@ The default `docker` driver supports the `inline`, `local`, `registry`, and
`gha` cache backends, but only if you have enabled the [containerd image store](/desktop/containerd.md).
Other cache backends require you to select a different [driver](../../drivers/_index.md).
> **Warning**
> [!WARNING]
>
> If you use secrets or credentials inside your build process, ensure you
> manipulate them using the dedicated
> [`--secret` option](../../../reference/cli/docker/buildx/build.md#secret).
> Manually managing secrets using `COPY` or `ARG` could result in leaked
> credentials.
{ .warning }
## Backends
@ -73,7 +72,7 @@ $ docker buildx build --push -t <registry>/<image> \
--cache-from type=registry,ref=<registry>/<cache-image>[,parameters...] .
```
> **Warning**
> [!WARNING]
>
> As a general rule, each cache writes to some location. No location can be
> written to twice, without overwriting the previously cached data. If you want

View File

@ -6,11 +6,10 @@ aliases:
- /build/building/cache/backends/azblob/
---
> **Experimental**
>
> This is an experimental feature. The interface and behavior are unstable and
> may change in future releases.
{ .restricted }
{{% experimental %}}
This is an experimental feature. The interface and behavior are unstable and
may change in future releases.
{{% /experimental %}}
The `azblob` cache store uploads your resulting build cache to
[Azure's blob storage service](https://azure.microsoft.com/en-us/services/storage/blobs/).

View File

@ -6,11 +6,10 @@ aliases:
- /build/building/cache/backends/gha/
---
> **Experimental**
>
> This is an experimental feature. The interface and behavior are unstable and
> may change in future releases.
{ .restricted }
{{% restricted %}}
This is an experimental feature. The interface and behavior are unstable and
may change in future releases.
{{% /restricted %}}
The GitHub Actions cache utilizes the
[GitHub-provided Action's cache](https://github.com/actions/cache) or other

View File

@ -6,11 +6,10 @@ aliases:
- /build/building/cache/backends/s3/
---
> **Experimental**
>
> This is an experimental feature. The interface and behavior are unstable and
> may change in future releases.
{ .restricted }
{{% restricted %}}
This is an experimental feature. The interface and behavior are unstable and
may change in future releases.
{{% /restricted %}}
The `s3` cache storage uploads your resulting build cache to
[Amazon S3 file storage service](https://aws.amazon.com/s3/)

View File

@ -86,7 +86,7 @@ GC Policy rule#3:
- `rule#3`: if previous policies were insufficient start deleting internal data
to keep build cache under cap.
> **Note**
> [!NOTE]
>
> `Keep Bytes` defaults to 10% of the size of the disk. If the disk size cannot
> be determined, it uses 2GB as a fallback.

View File

@ -152,7 +152,7 @@ jobs:
push: true
```
> **Note**
> [!NOTE]
>
> The build must produce the components that you want to annotate. For example,
> to annotate an image index, the build must produce an index. If the build

View File

@ -25,7 +25,7 @@ attestations to your image, with the following conditions:
attestations are added to the image. These output formats don't support
attestations.
> **Warning**
> [!WARNING]
>
> If you're using `docker/build-push-action` to build images for code in a
> public GitHub repository, the provenance attestations attached to your image
@ -35,7 +35,6 @@ attestations to your image, with the following conditions:
> attestation. Refactor your build to pass those secrets using
> [secret mounts](../../../reference/cli/docker/buildx/build.md#secret)
> instead. Also remember to rotate any secrets you may have exposed.
{ .warning }
## Max-level provenance

View File

@ -32,10 +32,9 @@ message that caused the build to fail:
{{< introduced desktop 4.31 >}}
> **Beta feature**
>
> Import builds is currently in [Beta](../../../release-lifecycle.md#Beta).
{ .experimental }
{{% experimental title="Beta feature" %}}
Import builds is currently in [Beta](../../../release-lifecycle.md#Beta).
{{% /experimental %}}
The job summary includes a link for downloading a build record archive for the
run. The build record archive is a ZIP file containing the details about a build

View File

@ -6,7 +6,7 @@ keywords: ci, github actions, gha, buildkit, buildx, cache
This page contains examples on using the cache storage backends with GitHub
Actions.
> **Note**
> [!NOTE]
>
> See [Cache storage backends](../../cache/backends/_index.md) for more
> details about cache storage backends.
@ -83,11 +83,11 @@ jobs:
### Cache backend API
> Experimental
>
> This cache exporter is experimental. Please provide feedback on [BuildKit repository](https://github.com/moby/buildkit)
> if you experience any issues.
{ .experimental }
{{% experimental %}}
This cache exporter is experimental. Please provide feedback on the
[BuildKit repository](https://github.com/moby/buildkit)
if you experience any issues.
{{% /experimental %}}
The [GitHub Actions cache exporter](../../cache/backends/gha.md)
backend uses the [GitHub Cache API](https://github.com/tonistiigi/go-actions-cache/blob/master/api.md)
@ -209,12 +209,11 @@ For more information about this workaround, refer to the
### Local cache
> **Warning**
> [!WARNING]
>
> At the moment, old cache entries aren't deleted, so the cache size [keeps growing](https://github.com/docker/build-push-action/issues/252).
> The following example uses the `Move cache` step as a workaround (see [`moby/buildkit#1896`](https://github.com/moby/buildkit/issues/1896)
> for more info).
{ .warning }
You can also leverage [GitHub cache](https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows)
using the [actions/cache](https://github.com/actions/cache) and [local cache exporter](../../cache/backends/local.md)

View File

@ -7,7 +7,7 @@ keywords: ci, github actions, gha, buildkit, buildx, multi-platform
You can build [multi-platform images](../../building/multi-platform.md) using
the `platforms` option, as shown in the following example:
> **Note**
> [!NOTE]
>
> - For a list of available platforms, see the [Docker Setup Buildx](https://github.com/marketplace/actions/docker-setup-buildx)
> action.

View File

@ -57,7 +57,7 @@ jobs:
"github_token=${{ secrets.GITHUB_TOKEN }}"
```
> **Note**
> [!NOTE]
>
> You can also expose a secret file to the build with the `secret-files` input:
>
@ -94,7 +94,7 @@ secrets: |
| `EMPTYLINE` | `aaaa\n\nbbbb\nccc` |
| `JSON_SECRET` | `{"key1":"value1","key2":"value2"}` |
> **Note**
> [!NOTE]
>
> Double escapes are needed for quote signs.

View File

@ -56,7 +56,7 @@ jobs:
tags: ${{ env.LATEST_TAG }}
```
> **Note**
> [!NOTE]
>
> The `linux/amd64` image is only built once in this workflow. The image is
> built once, and the following steps use the internal cache from the first

View File

@ -46,7 +46,7 @@ Custom Dockerfile implementations allow you to:
- Use [alternative build definitions, or create your own](https://github.com/moby/buildkit#exploring-llb)
- Build your own Dockerfile frontend with custom features
> **Note**
> [!NOTE]
>
> BuildKit ships with a built-in Dockerfile frontend, but it's recommended
> to use an external image to make sure that all users use the same version on

View File

@ -122,7 +122,7 @@ $ docker buildx build \
--push .
```
> **Note**
> [!NOTE]
>
> Emulation with QEMU can be much slower than native builds, especially for
> compute-heavy tasks like compilation and compression or decompression.

View File

@ -163,12 +163,11 @@ $ docker buildx build \
--push .
```
> **Warning**
> [!WARNING]
>
> QEMU performs full-CPU emulation of non-native platforms, which is much
> slower than native builds. Compute-heavy tasks like compilation and
> compression/decompression will likely take a large performance hit.
{ .warning }
Using a custom BuildKit image or invoking non-native binaries in builds may
require that you explicitly turn on QEMU using the `qemu.install` option when
@ -301,7 +300,7 @@ Prerequisites:
--driver-opt=namespace=buildkit
```
> **Note**
> [!NOTE]
>
> Remember to specify the namespace in driver options.

View File

@ -245,7 +245,7 @@ Use the `force-compression=true` option to force re-compressing layers imported
from a previous image, if the requested compression algorithm is different from
the previous compression algorithm.
> **Note**
> [!NOTE]
>
> The `gzip` and `estargz` compression methods use the [`compress/gzip` package](https://pkg.go.dev/compress/gzip),
> while `zstd` uses the [`github.com/klauspost/compress/zstd` package](https://github.com/klauspost/compress/tree/master/zstd).

View File

@ -31,4 +31,4 @@ workflows. You don't need to complete this entire guide from start to finish.
Follow the sections that seem relevant to you, and save the advanced sections at
the end for later, when you need them.
{{< button text="Get started" url="intro.md" >}}
{{< button text="Get started" url="intro.md" >}}

View File

@ -62,4 +62,4 @@ well as CI workflows. It also has commands for managing the whole lifecycle of y
* Stream the log output of running services
* Run a one-off command on a service
{{< grid >}}
{{< grid >}}

View File

@ -38,4 +38,4 @@ To use the `compose-bridge` binary as a `kubectl` plugin, you need to make sure
$ kubectl compose-bridge [command]
```
Replace `[command]` with any `compose-bridge` command you want to use.
Replace `[command]` with any `compose-bridge` command you want to use.

View File

@ -185,4 +185,4 @@ to the Compose Bridge transformation contract.
## What's next?
- [Explore the advanced integration](advanced-integration.md)
- [Explore the advanced integration](advanced-integration.md)

View File

@ -60,7 +60,7 @@ These files are then stored within your project in the `/out` folder.
The Kubernetes manifests can then be used to run the application on Kubernetes using
the standard deployment command `kubectl apply -k out/overlays/desktop/`.
> **Note**
> [!NOTE]
>
> Make sure you have enabled Kubernetes in Docker Desktop before you deploy your Compose Bridge transformations.
@ -70,12 +70,11 @@ If you want to convert a `compose.yaml` file that is located in another director
$ compose-bridge convert -f <path-to-file>/compose.yaml
```
> **Tip**
> [!TIP]
>
> Run `compose-bridge convert --help` to see all available flags.
{ .tip }
## What's next?
- [Explore how you can customize Compose Bridge](customize.md)
- [Explore the advanced integration](advanced-integration.md)
- [Explore the advanced integration](advanced-integration.md)

View File

@ -162,4 +162,4 @@ example-backend-1 example/database "docker-entrypoint.s…" backend
- [Quickstart](gettingstarted.md)
- [Explore some sample applications](samples-for-compose.md)
- [Familiarize yourself with the Compose Specification](compose-file/_index.md)
- [Familiarize yourself with the Compose Specification](compose-file/_index.md)

View File

@ -32,4 +32,4 @@ services:
command: echo "I'm running ${COMPOSE_PROJECT_NAME}"
```
For more information on other ways to name Compose projects, see [Specify a project name](../project-name.md).
For more information on other ways to name Compose projects, see [Specify a project name](../project-name.md).

View File

@ -723,7 +723,7 @@ expose:
- "8080-8085/tcp"
```
> **Note**
> [!NOTE]
>
> If the Dockerfile for the image already exposes ports, it is visible to other containers on the network even if `expose` is not set in your Compose file.
@ -1173,7 +1173,7 @@ are platform specific. Driver specific options can be set with `options` as key-
`mac_address` sets a MAC address for the service container.
> **Note**
> [!NOTE]
> Container runtimes might reject this value (ie. Docker Engine >= v25.0). In that case, you should use [networks.mac_address](#mac_address) instead.
### mem_limit
@ -1248,7 +1248,7 @@ network can use either the service name or an alias to connect to one of the ser
Since `aliases` are network-scoped, the same service can have different aliases on different networks.
> **Note**
> [!NOTE]
> A network-wide alias can be shared by multiple containers, and even by multiple services.
> If it is, then exactly which container the name resolves to is not guaranteed.
@ -1421,7 +1421,7 @@ platform: linux/arm64/v8
{{< include "compose/services-ports.md" >}}
> **Note**
> [!NOTE]
>
> Port mapping must not be used with `network_mode: host` otherwise a runtime error occurs.
@ -1461,7 +1461,7 @@ ports:
- "6060:6060/udp"
```
> **Note**
> [!NOTE]
>
> If Host IP mapping is not supported by a container engine, Compose rejects
> the Compose file and ignores the specified host IP.
@ -1828,11 +1828,11 @@ The short syntax uses a single string with colon-separated values to specify a v
- `z`: SELinux option indicating that the bind mount host content is shared among multiple containers.
- `Z`: SELinux option indicating that the bind mount host content is private and unshared for other containers.
> **Note**
> [!NOTE]
>
> The SELinux re-labeling bind mount option is ignored on platforms without SELinux.
> **Note**
> [!NOTE]
> Relative host paths are only supported by Compose that deploy to a
> local container runtime. This is because the relative path is resolved from the Compose files parent
> directory which is only applicable in the local case. When Compose deploys to a non-local
@ -1864,12 +1864,11 @@ expressed in the short form.
- `mode`: The file mode for the tmpfs mount as Unix permission bits as an octal number. Introduced in Docker Compose version [2.14.0](../release-notes.md#2260).
- `consistency`: The consistency requirements of the mount. Available values are platform specific.
> **Tip**
> [!TIP]
>
> Working with large repositories or monorepos, or with virtual file systems that are no longer scaling with your codebase?
> Compose now takes advantage of [Synchronized file shares](../../desktop/synchronized-file-sharing.md) and automatically creates file shares for bind mounts.
> Ensure you're signed in to Docker with a paid subscription and have enabled both **Access experimental features** and **Manage Synchronized file shares with Compose** in Docker Desktop's settings.
{ .tip }
### volumes_from

View File

@ -8,12 +8,11 @@ keywords: compose, compose specification, volumes, compose file reference
To use a volume across multiple services, you must explicitly grant each service access by using the [volumes](05-services.md#volumes) attribute within the `services` top-level element. The `volumes` attribute has additional syntax that provides more granular control.
> **Tip**
> [!TIP]
>
> Working with large repositories or monorepos, or with virtual file systems that are no longer scaling with your codebase?
> Compose now takes advantage of [Synchronized file shares](../../desktop/synchronized-file-sharing.md) and automatically creates file shares for bind mounts.
> Ensure you're signed in to Docker with a paid subscription and have enabled both **Access experimental features** and **Manage Synchronized file shares with Compose** in Docker Desktop's settings.
{ .tip }
## Example

View File

@ -38,4 +38,4 @@ secrets:
## Additional resources
For more information, see [How to use secrets in Compose](../use-secrets.md).
For more information, see [How to use secrets in Compose](../use-secrets.md).

View File

@ -81,7 +81,7 @@ services:
YET_ANOTHER: VARIABLE
```
> **Note**
> [!NOTE]
>
> [YAML merge](https://yaml.org/type/merge.html) only applies to mappings, and can't be used with sequences.

View File

@ -108,7 +108,7 @@ services:
YET_ANOTHER: VARIABLE
```
> **Note**
> [!NOTE]
>
> [YAML merge](https://yaml.org/type/merge.html) only applies to mappings, and can't be used with sequences.
>

View File

@ -12,7 +12,7 @@ Services without a `profiles` attribute are always enabled.
A service is ignored by Compose when none of the listed `profiles` match the active ones, unless the service is
explicitly targeted by a command. In that case its profile is added to the set of active profiles.
> **Note**
> [!NOTE]
>
> All other top-level elements are not affected by `profiles` and are always active.

View File

@ -40,7 +40,6 @@ aliases:
>**New to Docker Compose?**
>
> Find more information about the [key features and use cases of Docker Compose](../intro/features-uses.md) or [try the quickstart guide](../gettingstarted.md).
{ .tip }
The Compose Specification is the latest and recommended version of the Compose file format. It helps you define a [Compose file](../compose-application-model.md) which is used to configure your Docker applications services, networks, volumes, and more.

View File

@ -285,4 +285,4 @@ deploy:
parallelism: 2
delay: 10s
order: stop-first
```
```

View File

@ -80,4 +80,4 @@ inside the path, which doesn't match any `ignore` rule, triggers the configured
#### target
`target` attribute only applies when `action` is configured for `sync`. Files within `path` with changes are synchronized
with container filesystem, so that the latter is always running with up-to-date content.
with container filesystem, so that the latter is always running with up-to-date content.

View File

@ -10,4 +10,4 @@ aliases:
The legacy versions of the Compose file reference has moved to the [V1 branch of the Compose repository](https://github.com/docker/compose/tree/v1/docs). They are no longer being actively maintained.
The latest and recommended version of the Compose file format is defined by the [Compose Specification](_index.md). This format merges the 2.x and 3.x versions and is implemented by **Compose 1.27.0+**. For more information, see the[History and development of Docker Compose](../intro/history.md).
The latest and recommended version of the Compose file format is defined by the [Compose Specification](_index.md). This format merges the 2.x and 3.x versions and is implemented by **Compose 1.27.0+**. For more information, see the[History and development of Docker Compose](../intro/history.md).

View File

@ -7,10 +7,9 @@ keywords: compose, orchestration, environment, env file
By leveraging environment variables and interpolation in Docker Compose, you can create versatile and reusable configurations, making your Dockerized applications easier to manage and deploy across different environments.
> **Tip**
> [!TIP]
>
> Before using environment variables, read through all of the information first to get a full picture of environment variables in Docker Compose.
{ .tip }
This section covers:

View File

@ -163,7 +163,7 @@ When enabled, Compose displays a navigation menu where you can choose to open th
* `false` or `0`, to disable.
* Defaults to: `1` if you obtained Docker Compose through Docker Desktop, otherwise default is `0`.
> **Note**
> [!NOTE]
>
> Available in Docker Compose version 2.26.0 and later, and Docker Desktop version 4.29 and later
@ -176,7 +176,7 @@ This is an opt-out variable. When turned off it deactivates the experimental fea
* `false` or `0`, to disable.
* Defaults to: `1`.
> **Note**
> [!NOTE]
>
> Available in Docker Compose version 2.26.0 and later, and Docker Desktop version 4.29 and later

View File

@ -12,7 +12,6 @@ A container's environment is not set until there's an explicit entry in the serv
>**Tip**
>
> Don't use environment variables to pass sensitive information, such as passwords, in to your containers. Use [secrets](../use-secrets.md) instead.
{ .tip }
## Use the `environment` attribute
@ -74,12 +73,11 @@ The [`env_file` attribute](../compose-file/05-services.md#env_file) also lets yo
The paths to your `.env` file, specified in the `env_file` attribute, are relative to the location of your `compose.yml` file.
> **Important**
> [!IMPORTANT]
>
> Interpolation in `.env` files is a Docker Compose CLI feature.
>
> It is not supported when running `docker run --env-file ...`.
{ .important }
### Additional information

View File

@ -105,21 +105,19 @@ services:
```
Docker Compose replaces `${DEBUG}` with the value from the `.env` file
> **Important**
> [!IMPORTANT]
>
> Be aware of [Environment variables precedence](envvars-precedence.md) when using variables in an `.env` file that as environment variables in your container's environment.
{ .important }
- You can place your `.env` file in a location other than the root of your project's directory, and then use the [`--env-file` option in the CLI](#substitute-with---env-file) so Compose can navigate to it.
- Your `.env` file can be overridden by another `.env` if it is [substituted with `--env-file`](#substitute-with---env-file).
> **Important**
> [!IMPORTANT]
>
> Substitution from `.env` files is a Docker Compose CLI feature.
>
> It is not supported by Swarm when running `docker stack deploy`.
{ .important }
#### `.env` file syntax
@ -244,7 +242,7 @@ When you run `docker compose up` with this configuration, Compose looks for the
If an environment variable is not set, Compose substitutes with an empty string. In the previous example, if `POSTGRES_VERSION` is not set, the value for the image option is `postgres:`.
> **Note**
> [!NOTE]
>
> `postgres:` is not a valid image reference. Docker expects either a reference without a tag, like `postgres` which defaults to the latest image, or with a tag such as `postgres:15`.

View File

@ -98,7 +98,6 @@ It will work well when you update a database configuration or your `nginx.conf`
> Optimize your `Dockerfile` for speedy
incremental rebuilds with [image layer caching](/build/cache)
and [multi-stage builds](/build/building/multi-stage/).
{ .tip }
### `path` and `target`
@ -185,11 +184,10 @@ This setup demonstrates how to use the `sync+restart` action in Docker Compose t
{{< include "compose/configure-watch.md" >}}
> **Tip**
> [!TIP]
>
> Watch can also be used with the dedicated `docker compose watch` command if you don't want to
> get the application logs mixed with the (re)build logs and filesystem sync events.
{ .tip }
> **Looking for a sample project to test things out?**
>

View File

@ -63,7 +63,7 @@ Make sure you have:
In this example, `redis` is the hostname of the redis container on the
application's network and the default port, `6379` is used.
> **Note**
> [!NOTE]
>
> Note the way the `get_hit_count` function is written. This basic retry
> loop attempts the request multiple times if the Redis service is
@ -112,10 +112,9 @@ Make sure you have:
{{< /accordion >}}
> **Important**
> [!IMPORTANT]
>
>Check that the `Dockerfile` has no file extension like `.txt`. Some editors may append this file extension automatically which results in an error when you run the application.
{ .important }
For more information on how to write Dockerfiles, see the [Dockerfile reference](/reference/dockerfile/).
@ -242,7 +241,7 @@ Whenever a file is changed, Compose syncs the file to the corresponding location
For more information on how Compose Watch works, see [Use Compose Watch](file-watch.md). Alternatively, see [Manage data in containers](/engine/storage/volumes.md) for other options.
> **Note**
> [!NOTE]
>
> For this example to work, the `--debug` option is added to the `Dockerfile`. The `--debug` option in Flask enables automatic code reload, making it possible to work on the backend API without the need to restart or rebuild the container.
> After changing the `.py` file, subsequent API calls will use the new code, but the browser UI will not automatically refresh in this small example. Most frontend development servers include native live reload support that works with Compose.

View File

@ -22,12 +22,11 @@ This provides more granular control over a GPU reservation as custom values can
- `options`. Key-value pairs representing driver specific options.
> **Important**
> [!IMPORTANT]
>
> You must set the `capabilities` field. Otherwise, it returns an error on service deployment.
>
> `count` and `device_ids` are mutually exclusive. You must only define one field at a time.
{ .important }
For more information on these properties, see the [Compose Deploy Specification](compose-file/deploy.md#devices).

View File

@ -34,16 +34,14 @@ If you already have Docker Engine and Docker CLI installed, you can install the
- [Using Docker's repository](linux.md#install-using-the-repository)
- [Downloading and installing manually](linux.md#install-the-plugin-manually)
> **Important**
> [!IMPORTANT]
>
>This is only available on Linux
{ .important }
### Scenario three: Install the Compose standalone
You can [install the Compose standalone](standalone.md) on Linux or on Windows Server.
> **Warning**
> [!WARNING]
>
>This install scenario is not recommended and is only supported for backward compatibility purposes.
{ .warning }

View File

@ -18,7 +18,7 @@ To install the Compose plugin on Linux, you can either:
- [Set up Docker's repository on your Linux system](#install-using-the-repository).
- [Install Compose manually](#install-the-plugin-manually).
> **Note**
> [!NOTE]
>
> These instructions assume you already have Docker Engine and Docker CLI installed and now want to install the Compose plugin.
For Compose standalone, see [Install Compose Standalone](standalone.md).
@ -83,7 +83,7 @@ To update the Compose plugin, run the following commands:
## Install the plugin manually
> **Note**
> [!NOTE]
>
> This option requires you to manage upgrades manually. We recommend setting up Docker's repository for easier maintenance.

View File

@ -21,7 +21,7 @@ On this page you can find instructions on how to install Compose standalone on L
2. Apply executable permissions to the standalone binary in the target path for the installation.
3. Test and execute compose commands using `docker-compose`.
> **Tip**
> [!TIP]
>
> If the command `docker-compose` fails after installation, check your path.
> You can also create a symbolic link to `/usr/bin` or any other directory in your path.
@ -29,7 +29,6 @@ On this page you can find instructions on how to install Compose standalone on L
> ```console
> $ sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
> ```
{ .tip }
### On Windows Server
@ -50,7 +49,7 @@ on Microsoft Windows Server and want to install Docker Compose.
Start-BitsTransfer -Source "https://github.com/docker/compose/releases/download/{{% param "compose_version" %}}/docker-compose-windows-x86_64.exe" -Destination $Env:ProgramFiles\Docker\docker-compose.exe
```
> **Note**
> [!NOTE]
>
> On Windows Server 2019 you can add the Compose executable to `$Env:ProgramFiles\Docker`.
Because this directory is registered in the system `PATH`, you can run the `docker-compose --version`

View File

@ -11,7 +11,7 @@ Uninstalling Docker Compose depends on the method you have used to install Docke
If you want to uninstall Compose and you have installed Docker Desktop, see [Uninstall Docker Desktop](../../desktop/uninstall.md).
> **Note**
> [!NOTE]
>
> Unless you have other Docker instances installed on that specific environment, you would be removing Docker altogether by uninstalling the Desktop.
@ -51,7 +51,6 @@ Or, if you have installed Compose for all users, run:
> If you get a **Permission denied** error using either of the above
> methods, you do not have the permissions allowing you to remove
> `docker-compose`. To force the removal, prepend `sudo` to either of the above instructions and run it again.
{ .tip }
### Inspect the location of the Compose CLI plugin
@ -60,4 +59,4 @@ To check where Compose is installed, use:
```console
$ docker info --format '{{range .ClientInfo.Plugins}}{{if eq .Name "compose"}}{{.Path}}{{end}}{{end}}'
```
```

View File

@ -33,10 +33,9 @@ The Docker CLI platform provides a consistent and predictable set of options and
This change lets you use all of the shared flags on the root `docker` command.
For example, `docker --log-level=debug --tls compose up` enables debug logging from the Docker Engine as well as ensuring that TLS is used for the connection.
> **Tip**
> [!TIP]
>
> Update scripts to use Compose V2 by replacing the hyphen (`-`) with a space, using `docker compose` instead of `docker-compose`.
{ .tip }
### Service container names
@ -50,11 +49,10 @@ By using a hyphen instead, Compose V2 ensures service containers can be accessed
For example, running the Compose command `-p myproject up --scale=1 svc` results in a container named `myproject_svc_1` with Compose V1 and a container named `myproject-svc-1` with Compose V2.
> **Tip**
> [!TIP]
>
>In Compose V2, the global `--compatibility` flag or `COMPOSE_COMPATIBILITY` environment variable preserves the Compose V1 behavior to use underscores (`_`) as the word separator.
As this option must be specified for every Compose V2 command run, it's recommended that you only use this as a temporary measure while transitioning to Compose V2.
{ .tip }
### Command-line flags and subcommands
@ -87,14 +85,13 @@ Check if:
- Any `.env` file values contain literal `$` signs in them. This is common with PHP projects.
- Any variable values use advanced expansion syntax, for example `${VAR:?error}`.
> **Tip**
> [!TIP]
>
> Run `docker compose config` on the project to preview the configuration after Compose V2 has performed interpolation to
verify that values appear as expected.
>
> Maintaining backwards compatibility with Compose V1 is typically achievable by ensuring that literal values (no
interpolation) are single-quoted and values that should have interpolation applied are double-quoted.
{ .tip }
## What does this mean for my projects that use Compose V1?
@ -128,7 +125,6 @@ Yes. You can still download and install Compose V1 packages, but you won't get s
>**Warning**
>
> The final Compose V1 release, version 1.29.2, was May 10, 2021. These packages haven't received any security updates since then. Use at your own risk.
{ .warning }
## Additional Resources

View File

@ -17,7 +17,7 @@ service options in one place and refer to it from anywhere. You can refer to
another Compose file and select a service you want to also use in your own
application, with the ability to override some attributes for your own needs.
> **Important**
> [!IMPORTANT]
>
> When you use multiple Compose files, you must make sure all paths in the files
are relative to the base Compose file (i.e. the Compose file in your main-project folder). This is required because extend files
@ -25,7 +25,6 @@ need not be valid Compose files. Extend files can contain small fragments of
configuration. Tracking which fragment of a service is relative to which path is
difficult and confusing, so to keep paths easier to understand, all paths must
be defined relative to the base file.
{ .important }
## How it works

View File

@ -14,7 +14,7 @@ Each path listed in the `include` section loads as an individual Compose applica
Once the included Compose application loads, all resources are copied into the current Compose application model.
> **Note**
> [!NOTE]
>
> `include` applies recursively so an included Compose file which declares its own `include` section, results in those other files being included as well.

View File

@ -66,7 +66,7 @@ webapp:
- ANOTHER_VARIABLE=value
```
> **Important**
> [!IMPORTANT]
>
> When you use multiple Compose files, you must make sure all paths in the
files are relative to the base Compose file (the first Compose file specified
@ -75,7 +75,6 @@ Compose files. Override files can contain small fragments of configuration.
Tracking which fragment of a service is relative to which path is difficult and
confusing, so to keep paths easier to understand, all paths must be defined
relative to the base file.
{ .important }
### Additional information

View File

@ -11,7 +11,7 @@ By default Compose sets up a single
container for a service joins the default network and is both reachable by
other containers on that network, and discoverable by the service's name.
> **Note**
> [!NOTE]
>
> Your app's network is given a name based on the "project name",
> which is based on the name of the directory it lives in. You can override the
@ -61,10 +61,9 @@ If you make a configuration change to a service and run `docker compose up` to u
If any containers have connections open to the old container, they are closed. It is a container's responsibility to detect this condition, look up the name again and reconnect.
> **Tip**
> [!TIP]
>
> Reference containers by name, not IP, whenever possible. Otherwise youll need to constantly update the IP address you use.
{ .tip }
## Link containers

View File

@ -61,4 +61,4 @@ You can use Compose to deploy an app to a remote Docker host by setting the
appropriately. For more information, see [pre-defined environment variables](environment-variables/envvars.md).
Once you've set up your environment variables, all the normal `docker compose`
commands work with no further configuration.
commands work with no further configuration.

View File

@ -39,11 +39,10 @@ case running `docker compose up` would only start `backend` and `db`.
Valid profiles names follow the regex format of `[a-zA-Z0-9][a-zA-Z0-9_.-]+`.
> **Tip**
> [!TIP]
>
> The core services of your application shouldn't be assigned `profiles` so
> they are always enabled and automatically started.
{ .tip }
## Start specific profiles

View File

@ -8,7 +8,7 @@ In Compose, the default project name is derived from the base name of the projec
This page offers examples of scenarios where custom project names can be helpful, outlines the various methods to set a project name, and provides the order of precedence for each approach.
> **Note**
> [!NOTE]
>
> The default project directory is the base directory of the Compose file. A custom value can also be set
> for it using the [`--project-directory` command line option](reference/_index.md).

View File

@ -372,7 +372,7 @@ This release fixes a build issue with Docker Desktop for Windows introduced in C
{{< release-date date="2023-09-21" >}}
> **Note**
> [!NOTE]
>
> The `watch` command is now generally available (GA). You can directly use it from the root command `docker compose watch`.
> For more information, see [File watch](./file-watch.md).
@ -398,7 +398,7 @@ This release fixes a build issue with Docker Desktop for Windows introduced in C
{{< release-date date="2023-08-30" >}}
> **Note**
> [!NOTE]
>
> The format of `docker compose ps` and `docker compose ps --format=json` changed to better align with `docker ps` output. See [compose#10918](https://github.com/docker/compose/pull/10918).
@ -864,7 +864,7 @@ For the full change log or additional information, check the [Compose repository
{{< release-date date="2022-09-27" >}}
> **Note**
> [!NOTE]
>
> - Updates on environment file syntax & interpolation: see [compose#9879](https://github.com/docker/compose/issues/9879)
> - Setting `DOCKER_HOST` via `.env` files is not supported in Compose v2
@ -1002,13 +1002,12 @@ For the full change log, check the [Compose repository 2.10.0 release page](http
{{< release-date date="2022-08-7" >}}
> **Important**
> [!IMPORTANT]
>
> Compose v2.9.0 contains changes to the environment variable's precedence that have since been reverted. We recommend using v2.10+ to avoid compatibility issues.
>
{ .important }
> **Note**
> [!NOTE]
>
> This release reverts the breaking changes introduced in [Compose v2.8.0](#280) by [`compose-go v1.3.0`](https://github.com/compose-spec/compose-go/releases/tag/v1.3.0).
@ -1028,14 +1027,13 @@ For the full change log or additional information, check the [Compose repository
{{< release-date date="2022-07-29" >}}
> **Important**
> [!IMPORTANT]
>
>This release introduced a breaking change via `compose-go v1.3.0` and this [PR](https://github.com/compose-spec/compose-go/pull/294).
In this release, Docker Compose recreates new resources (networks, volumes, secrets, configs, etc.) with new names, using a `-` (dash) instead an `_` (underscore) and tries to connect to or use these newly created resources instead of your existing ones!
>
> Please use Compose the v2.9.0 release instead.
>
{ .important }
### New
@ -1838,7 +1836,7 @@ This release contains minor improvements and bug fixes.
- Reverted a 1.23.0 change that appended random strings to container names
created by `docker-compose up`, causing addressability issues.
> **Note**: Containers created by `docker-compose run` will continue to use
> [!NOTE]: Containers created by `docker-compose run` will continue to use
randomly generated names to avoid collisions during parallel runs.
- Fixed an issue where some `dockerfile` paths would fail unexpectedly when

View File

@ -80,7 +80,7 @@ In the advanced example above:
- The top-level `secrets` section defines the variables `db_password` and `db_root_password` and provides the `file` that populates their values.
- The deployment of each container means Docker creates a temporary filesystem mount under `/run/secrets/<secret_name>` with their specific values.
> **Note**
> [!NOTE]
>
> The `_FILE` environment variables demonstrated here are a convention used by some images, including Docker Official Images like [mysql](https://hub.docker.com/_/mysql) and [postgres](https://hub.docker.com/_/postgres).

View File

@ -51,4 +51,4 @@ For information on how to add redirects, see [Source file conventions](file-conv
##### Completed a final spelling, punctuation, and grammar check
For more in-depth information on our Style Guide, explore the [grammar](style/grammar.md) or [formatting](style/formatting.md) guides.
For more in-depth information on our Style Guide, explore the [grammar](style/grammar.md) or [formatting](style/formatting.md) guides.

View File

@ -12,4 +12,4 @@ toc_max: 3
```go
{{</* button url="https://example.com/" text="hello" */>}}
```
```

View File

@ -6,19 +6,20 @@ toc_max: 3
We support these broad categories of callouts:
- Alerts (Note, Tip, Important, Warning, Caution)
- Version callouts
- Notes (no HTML attribute required)
- Tips, which use the `{ .tip }` class
- Important, which use the `{ .important }` class
- Warning, which use the `{ .warning }` class
- Experimental, which use the `{ .experimental }` class
- Restricted, which use the `{ .restricted }` class
- Experimental, which use the `{{%/* experimental */%}}` shortcode
- Restricted, which use the `{{%/* restricted */%}}` shortcode
The experimental and restricted shortcodes take a title as an argument. The
title is optional, defaults to "Experimental" or "Restricted" respectively, and
is displayed in the callout.
## Examples
{{< introduced buildx 0.10.4 >}}
{{< introduced buildx 0.16.0 >}}
> **Note**
> [!NOTE]
>
> Note the way the `get_hit_count` function is written. This basic retry
> loop lets us attempt our request multiple times if the redis service is
@ -28,20 +29,16 @@ We support these broad categories of callouts:
> cluster, this also helps handling momentary connection drops between
> nodes.
> **Tip**
> [!TIP]
>
> For a smaller base image, use `alpine`.
{ .tip }
> **Important**
> [!IMPORTANT]
>
> Treat access tokens like your password and keep them secret. Store your
> tokens securely (for example, in a credential manager).
{ .important }
> **Warning**
> [!WARNING]
>
> Removing Volumes
>
@ -50,20 +47,20 @@ We support these broad categories of callouts:
> the `--volumes` flag.
>
> The Docker Dashboard does not remove volumes when you delete the app stack.
{ .warning }
> [!CAUTION]
>
> Here be dragons.
For both of the following callouts, consult [the Docker release lifecycle](/release-lifecycle) for more information on when to use them.
> **Beta feature**
>
> The Builds view is currently in Beta. This feature may change or be removed from future releases.
{ .experimental }
{{% experimental title="Beta feature" %}}
The Builds view is currently in Beta. This feature may change or be removed from future releases.
{{% /experimental %}}
> **Restricted**
>
> Docker Scout is an [early access](/release-lifecycle/#early-access-ea)
> product.
{ .restricted}
{{% restricted %}}
Docker Scout is an [early access](/release-lifecycle/#early-access-ea) product.
{{% /restricted %}}
## Formatting
@ -72,7 +69,7 @@ For both of the following callouts, consult [the Docker release lifecycle](/rele
```
```html
> **Note**
> [!NOTE]
>
> Note the way the `get_hit_count` function is written. This basic retry
> loop lets us attempt our request multiple times if the redis service is
@ -82,18 +79,16 @@ For both of the following callouts, consult [the Docker release lifecycle](/rele
> cluster, this also helps handling momentary connection drops between
> nodes.
> **Tip**
> [!TIP]
>
> For a smaller base image, use `alpine`.
{ .tip }
> **Important**
> [!IMPORTANT]
>
> Treat access tokens like your password and keep them secret. Store your
> tokens securely (for example, in a credential manager).
{ .important }
> **Warning**
> [!WARNING]
>
> Removing Volumes
>
@ -102,16 +97,18 @@ For both of the following callouts, consult [the Docker release lifecycle](/rele
> the `--volumes` flag.
>
> The Docker Dashboard does _not_ remove volumes when you delete the app stack.
{ .warning }
> **Beta feature**
> [!CAUTION]
>
> The Builds view is currently in Beta. This feature may change or be removed from future releases.
{ .experimental }
> **Restricted**
>
> Docker Scout is an [early access](/release-lifecycle/#early-access-ea)
> product.
{ .restricted }
> Here be dragons.
```
```go
{{%/* experimental title="Beta feature" */%}}
The Builds view is currently in Beta. This feature may change or be removed from future releases.
{{%/* /experimental */%}}
{{%/* restricted */%}}
Docker Scout is an [early access](/release-lifecycle/#early-access-ea) product.
{{%/* /restricted */%}}
```

View File

@ -36,7 +36,7 @@ The parameters for this shortcode are:
| link | (Optional) The link target of the card, when clicked |
| description | A description text, in Markdown |
> **Note**
> [!NOTE]
>
> There's a known limitation with the Markdown description of cards,
> in that they can't contain relative links, pointing to other .md documents.
@ -94,4 +94,4 @@ grid:
description: Clang bang
icon: "build"
link: "/build/"
```
```

Some files were not shown because too many files have changed in this diff Show More