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
31 changes: 15 additions & 16 deletions content/guides/bake/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ This guide assumes that you're familiar with:

## Prerequisites

- A recent version of Docker is installed on your machine.
- Git is installed for cloning repositories.
- You have a recent version of Docker installed on your machine.
- You have Git installed for cloning repositories.
- You're using the [containerd](/manuals/desktop/containerd.md) image store.

## Introduction

This guide uses an example project to demonstrate how Docker Buildx Bake can
streamline your build and test workflows. This repository includes both a
Dockerfile and `docker-bake.hcl`, giving you a ready-to-use setup to try out
Bake commands.
streamline your build and test workflows. The repository includes both a
Dockerfile and a `docker-bake.hcl` file, giving you a ready-to-use setup to try
out Bake commands.

Start by cloning the example repository:

Expand Down Expand Up @@ -114,7 +114,7 @@ $ docker buildx build \

## Testing and linting

Bake isn't just for defining build configurations, and running builds. You can
Bake isn't just for defining build configurations and running builds. You can
also use Bake to run your tests, effectively using BuildKit as a task runner.
Running your tests in containers is great for ensuring reproducible results.
This section shows how to add two types of tests:
Expand All @@ -133,7 +133,7 @@ target "test" {
```

> [!TIP]
> Using the `type=cacheonly` ensures that the build output is effectively
> Using `type=cacheonly` ensures that the build output is effectively
> discarded; the layers are saved to BuildKit's cache, but Buildx will not
> attempt to load the result to the Docker Engine's image store.
>
Expand All @@ -145,7 +145,7 @@ you'll receive an error indicating that the `test` stage does not exist in the
Dockerfile.

```console
$ docker buildx bake bake test
$ docker buildx bake test
[+] Building 1.2s (6/6) FINISHED
=> [internal] load local bake definitions
...
Expand Down Expand Up @@ -252,13 +252,12 @@ combinations to build:

The `matrix` attribute defines the variants to build ("release" and "debug").
The `name` attribute defines how the matrix gets expanded into multiple
distinct build targets. In this case, it's relatively simple. The matrix
attribute expands the build into two workflows: `image-release` and
`image-debug`, each using different configuration parameters.
distinct build targets. In this case, the matrix attribute expands the build
into two workflows: `image-release` and `image-debug`, each using different
configuration parameters.

Next, when building the development variant, we'll pass in a `BUILD_TAGS`
argument with the value of the matrix variable, which we'll later consume in
the Dockerfile.
Next, define a build argument named `BUILD_TAGS` which takes the value of the
matrix variable.

```diff {title="docker-bake.hcl"}
target = "image"
Expand Down Expand Up @@ -365,7 +364,7 @@ bakeme:latest 20065d2c4d22 44.4MB 25.9MB

Exporting build artifacts like binaries can be useful for deploying to
environments without Docker or Kubernetes. For example, if your programs are
meant to be run on user's local machine.
meant to be run on a user's local machine.

> [!TIP]
> The techniques discussed in this section can be applied not only to build
Expand Down Expand Up @@ -502,7 +501,7 @@ multi-platform builds, testing, and artifact export. By integrating Buildx Bake
into your projects, you can simplify your Docker builds, make your build
configuration portable, and wrangle complex configurations more easily.

Experiment with different configurations and extend your Bake files to match
Experiment with different configurations and extend your Bake files to suit
your project's needs. You might consider integrating Bake into your CI/CD
pipelines to automate builds, testing, and artifact deployment. The flexibility
and power of Buildx Bake can significantly improve your development and
Expand Down
51 changes: 27 additions & 24 deletions content/guides/jupyter.md
Original file line number Diff line number Diff line change
Expand Up @@ -383,39 +383,42 @@ $ docker run --rm -p 8889:8888 YOUR-USER-NAME/my-jupyer-image start-notebook.py

### Share your volume

This example uses the Docker Desktop [Volumes Backup & Share](https://hub.docker.com/extensions/docker/volumes-backup-extension) extension. Alternatively, in the CLI you can [back up the volume](/engine/storage/volumes/#back-up-a-volume) and then [push it using the ORAS CLI](/manuals/docker-hub/oci-artifacts.md#push-a-volume).

1. Install the Volumes Backup & Share extension.

1. Open the Docker Dashboard and select **Extensions**.
2. Search for `Volumes Backup & Share`.
3. In the search results select **Install** for the extension.

2. Open the **Volumes Backup & Share** extension in the Docker Dashboard.
3. Next to the **jupyter-data** volume, select the **Export volume** icon.
4. In the **Export content** window, select **Registry**.
5. In the text box under **Registry**, specify your Docker ID and a name for the
volume. For example, `YOUR-USERNAME/jupyter-data`.
6. Select **Export**.
7. Verify that you exported the volume to Docker Hub.
This example uses the Docker Desktop graphical user interface. Alternatively, in the command line interface you can [back up the volume](/engine/storage/volumes/#back-up-a-volume) and then [push it using the ORAS CLI](/manuals/docker-hub/oci-artifacts.md#push-a-volume).

1. Sign in to Docker Desktop.
2. In the Docker Dashboard, select **Volumes**.
3. Select the **jupyter-data** volume by selecting the name.
4. Select the **Exports** tab.
5. Select **Quick export**.
6. For **Location**, select **Registry**.
7. In the text box under **Registry**, specify your Docker ID, a name for the
volume, and a tag. For example, `YOUR-USERNAME/jupyter-data:latest`.
8. Select **Save**.
9. Verify that you exported the volume to Docker Hub.
1. Go to [Docker Hub](https://hub.docker.com).
2. Select **Repositories**.
3. View the **Last pushed** time for your repository.

Other users can now download and import your volume. To import the volume and then run it with your image:

1. In the Volumes Backup & Share extension, select **Import into new volume**.
2. In the **Import into a new volume** window, select **Registry**.
3. In the text box under **Registry**, specify your Docker ID and the repository
name for the volume. For example, `YOUR-USERNAME/jupyter-data`.
4. In **Volume name**, specify the name you want to give the
volume. This example uses `jupyter-data` as the name.
5. Select **Import**.
6. In a terminal, run `docker run` to run your image with the imported volume.
1. Sign in to Docker Desktop.
2. In the Docker Dashboard, select **Volumes**.
3. Select **Create** to create a new volume.
4. Specify a name for the new volume. For this example, use `jupyter-data-2`.
5. Select **Create**.
6. In the list of volumes, select the **jupyter-data-2** volume by selecting the
name.
7. Select **Import**.
8. For **Location**, select **Registry**.
9. In the text box under **Registry**, specify the same name as the repository
that you exported your volume to. For example,
`YOUR-USERNAME/jupyter-data:latest`.
10. Select **Import**.
11. In a terminal, run `docker run` to run your image with the imported volume.
Replace `YOUR-USER-NAME` with your Docker ID.

```console
$ docker run --rm -p 8889:8888 -v jupyter-data:/home/jovyan/work YOUR-USER-NAME/my-jupyter-image start-notebook.py --NotebookApp.token='my-token'
$ docker run --rm -p 8889:8888 -v jupyter-data-2:/home/jovyan/work YOUR-USER-NAME/my-jupyter-image start-notebook.py --NotebookApp.token='my-token'
```

## Summary
Expand Down
8 changes: 6 additions & 2 deletions content/manuals/security/for-admins/access-tokens.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@ The organization access tokens feature is currently in [Beta](../../release-life

> [!WARNING]
>
> Organization access tokens aren't currently compatible with Docker Build Cloud. If you
> are using Docker Build Cloud, you must use personal access tokens instead.
> Organization access tokens aren't currently compatible with the following services:
>
> - Docker Build Cloud
> - Docker Scout
>
> If you use these services, you must use personal access tokens instead.

An organization access token (OAT) is like a [personal access token
(PAT)](/security/for-developers/access-tokens/), but an OAT is associated with
Expand Down
Loading