diff --git a/.github/buildkit-container-logs.png b/.github/buildkit-container-logs.png deleted file mode 100644 index e2cf1ea..0000000 Binary files a/.github/buildkit-container-logs.png and /dev/null differ diff --git a/README.md b/README.md index 5dcf392..0b05f40 100644 --- a/README.md +++ b/README.md @@ -19,12 +19,7 @@ a [BuildKit](https://github.com/moby/buildkit) container. ___ * [Usage](#usage) -* [Advanced usage](#advanced-usage) - * [Authentication support](docs/advanced/auth.md) - * [Append additional nodes to the builder](docs/advanced/append-nodes.md) - * [Install by default](docs/advanced/install-default.md) - * [BuildKit daemon configuration](docs/advanced/buildkit-config.md) - * [Standalone mode](docs/advanced/standalone.md) +* [Configuring your builder](#configuring-your-builder) * [Customizing](#customizing) * [inputs](#inputs) * [outputs](#outputs) @@ -32,7 +27,7 @@ ___ * [Notes](#notes) * [`nodes` output](#nodes-output) * [BuildKit container logs](#buildkit-container-logs) -* [Keep up-to-date with GitHub Dependabot](#keep-up-to-date-with-github-dependabot) +* [Contributing](#contributing) ## Usage @@ -59,13 +54,9 @@ jobs: uses: docker/setup-buildx-action@v2 ``` -## Advanced usage +## Configuring your builder -* [Authentication support](docs/advanced/auth.md) -* [Append additional nodes to the builder](docs/advanced/append-nodes.md) -* [Install by default](docs/advanced/install-default.md) -* [BuildKit daemon configuration](docs/advanced/buildkit-config.md) -* [Standalone mode](docs/advanced/standalone.md) +See https://docs.docker.com/build/ci/github-actions/configure-builder/ ## Customizing @@ -153,33 +144,9 @@ The following [official docker environment variables](https://docs.docker.com/en ### BuildKit container logs -To display BuildKit container logs (when `docker-container` driver is used) you have to [enable step debug logging](https://docs.github.com/en/actions/managing-workflow-runs/enabling-debug-logging#enabling-step-debug-logging), -or you can also enable debugging in the [setup-buildx action step](https://github.com/docker/setup-buildx-action): +See https://docs.docker.com/build/ci/github-actions/configure-builder/#buildkit-container-logs -```yaml - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - with: - buildkitd-flags: --debug -``` +## Contributing -Logs will be available at the end of a job: - -![BuildKit container logs](.github/buildkit-container-logs.png) - -## Keep up-to-date with GitHub Dependabot - -Since [Dependabot](https://docs.github.com/en/github/administering-a-repository/keeping-your-actions-up-to-date-with-github-dependabot) -has [native GitHub Actions support](https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates#package-ecosystem), -to enable it on your GitHub repo all you need to do is add the `.github/dependabot.yml` file: - -```yaml -version: 2 -updates: - # Maintain dependencies for GitHub Actions - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "daily" -``` +Want to contribute? Awesome! You can find information about contributing to +this project in the [CONTRIBUTING.md](/.github/CONTRIBUTING.md) diff --git a/docs/advanced/append-nodes.md b/docs/advanced/append-nodes.md index 2753519..175350f 100644 --- a/docs/advanced/append-nodes.md +++ b/docs/advanced/append-nodes.md @@ -1,56 +1,3 @@ # Append additional nodes to the builder -Buildx also supports running builds on multiple machines. This is useful for -building [multi-platform images](https://docs.docker.com/build/building/multi-platform/) -on native nodes for more complicated cases that are not handled by QEMU and -generally have better performance or for distributing the build across multiple -machines. - -You can append nodes to the builder that is going to be created with the -`append` input in the form of a YAML string document to remove limitations -intrinsically linked to GitHub Actions (only string format is handled in the -input fields): - -| Name | Type | Description | -|-------------------|--------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `name` | String | [Name of the node](https://docs.docker.com/engine/reference/commandline/buildx_create/#node). If empty, it is the name of the builder it belongs to, with an index number suffix. This is useful to set it if you want to modify/remove a node in an underlying step of you workflow. | -| `endpoint` | String | [Docker context or endpoint](https://docs.docker.com/engine/reference/commandline/buildx_create/#description) of the node to add to the builder | -| `driver-opts` | List | List of additional [driver-specific options](https://docs.docker.com/engine/reference/commandline/buildx_create/#driver-opt) | -| `buildkitd-flags` | String | [Flags for buildkitd](https://docs.docker.com/engine/reference/commandline/buildx_create/#buildkitd-flags) daemon | -| `platforms` | String | Fixed [platforms](https://docs.docker.com/engine/reference/commandline/buildx_create/#platform) for the node. If not empty, values take priority over the detected ones. | - -Here is an example using remote nodes with the [`remote` driver](https://docs.docker.com/build/building/drivers/remote/) -and [TLS authentication](auth.md#tls-authentication): - -```yaml -name: ci - -on: - push: - -jobs: - buildx: - runs-on: ubuntu-latest - steps: - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - with: - driver: remote - endpoint: tcp://oneprovider:1234 - append: | - - endpoint: tcp://graviton2:1234 - platforms: linux/arm64 - - endpoint: tcp://linuxone:1234 - platforms: linux/s390x - env: - BUILDER_NODE_0_AUTH_TLS_CACERT: ${{ secrets.ONEPROVIDER_CA }} - BUILDER_NODE_0_AUTH_TLS_CERT: ${{ secrets.ONEPROVIDER_CERT }} - BUILDER_NODE_0_AUTH_TLS_KEY: ${{ secrets.ONEPROVIDER_KEY }} - BUILDER_NODE_1_AUTH_TLS_CACERT: ${{ secrets.GRAVITON2_CA }} - BUILDER_NODE_1_AUTH_TLS_CERT: ${{ secrets.GRAVITON2_CERT }} - BUILDER_NODE_1_AUTH_TLS_KEY: ${{ secrets.GRAVITON2_KEY }} - BUILDER_NODE_2_AUTH_TLS_CACERT: ${{ secrets.LINUXONE_CA }} - BUILDER_NODE_2_AUTH_TLS_CERT: ${{ secrets.LINUXONE_CERT }} - BUILDER_NODE_2_AUTH_TLS_KEY: ${{ secrets.LINUXONE_KEY }} -``` +This page has moved to [Docker Docs website](https://docs.docker.com/build/ci/github-actions/configure-builder/#append-additional-nodes-to-the-builder) diff --git a/docs/advanced/auth.md b/docs/advanced/auth.md index 7a1892e..338c89e 100644 --- a/docs/advanced/auth.md +++ b/docs/advanced/auth.md @@ -1,64 +1,3 @@ # Authentication support -## SSH authentication - -To be able to connect to an SSH endpoint using the [`docker-container` driver](https://docs.docker.com/build/building/drivers/docker-container/), -you have to set up the SSH private key and configuration on the GitHub Runner: - -```yaml -name: ci - -on: - push: - -jobs: - buildx: - runs-on: ubuntu-latest - steps: - - - name: Set up SSH - uses: MrSquaare/ssh-setup-action@523473d91581ccbf89565e12b40faba93f2708bd # v1.1.0 - with: - host: graviton2 - private-key: ${{ secrets.SSH_PRIVATE_KEY }} - private-key-name: aws_graviton2 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - with: - endpoint: ssh://me@graviton2 -``` - -## TLS authentication - -You can also [set up a remote BuildKit instance](https://docs.docker.com/build/building/drivers/remote/#remote-buildkit-in-docker-container) -using the remote driver. To ease the integration in your workflow, we put in -place environment variables that will set up authentication using the BuildKit -client certificates for the `tcp://` endpoint where `` is the position of -the node in the list of nodes: - -* `BUILDER_NODE__AUTH_TLS_CACERT` -* `BUILDER_NODE__AUTH_TLS_CERT` -* `BUILDER_NODE__AUTH_TLS_KEY` - -```yaml -name: ci - -on: - push: - -jobs: - buildx: - runs-on: ubuntu-latest - steps: - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - with: - driver: remote - endpoint: tcp://graviton2:1234 - env: - BUILDER_NODE_0_AUTH_TLS_CACERT: ${{ secrets.GRAVITON2_CA }} - BUILDER_NODE_0_AUTH_TLS_CERT: ${{ secrets.GRAVITON2_CERT }} - BUILDER_NODE_0_AUTH_TLS_KEY: ${{ secrets.GRAVITON2_KEY }} -``` +This page has moved to [Docker Docs website](https://docs.docker.com/build/ci/github-actions/configure-builder/#authentication-for-remote-builders) diff --git a/docs/advanced/buildkit-config.md b/docs/advanced/buildkit-config.md index d552795..15c9437 100644 --- a/docs/advanced/buildkit-config.md +++ b/docs/advanced/buildkit-config.md @@ -1,67 +1,3 @@ # BuildKit daemon configuration -You can provide a [BuildKit configuration](https://github.com/moby/buildkit/blob/master/docs/buildkitd.toml.md) -to your builder if you're using the [`docker-container` driver](https://docs.docker.com/build/building/drivers/docker-container/) -(default) with the `config` or `config-inline` inputs: - -## Registry mirror - -You can configure a registry mirror using an inline block directly in your -workflow with the `config-inline` input: - -```yaml -name: ci - -on: - push: - -jobs: - buildx: - runs-on: ubuntu-latest - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - with: - config-inline: | - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] -``` - -## Max parallelism - -You can limit the parallelism of the BuildKit solver which is particularly -useful for low-powered machines. - -You can use the `config-inline` input like the previous example, or you can use -a dedicated BuildKit config file from your repo if you want with the -`config` input: - -```toml -# .github/buildkitd.toml -[worker.oci] - max-parallelism = 4 -``` - -```yaml -name: ci - -on: - push: - -jobs: - buildx: - runs-on: ubuntu-latest - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - with: - config: .github/buildkitd.toml -``` +This page has moved to [Docker Docs website](https://docs.docker.com/build/ci/github-actions/configure-builder/#daemon-configuration) diff --git a/docs/advanced/install-default.md b/docs/advanced/install-default.md deleted file mode 100644 index ca95d5c..0000000 --- a/docs/advanced/install-default.md +++ /dev/null @@ -1,28 +0,0 @@ -# Install by default - -If you want set up the `docker build` command as an alias to -`docker buildx build`: - -```yaml -name: ci - -on: - push: - -jobs: - buildx: - runs-on: ubuntu-latest - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - with: - install: true - - - name: Build - run: | - docker build . # will run buildx -``` diff --git a/docs/advanced/standalone.md b/docs/advanced/standalone.md index 53abf91..e6b3e29 100644 --- a/docs/advanced/standalone.md +++ b/docs/advanced/standalone.md @@ -1,29 +1,3 @@ # Standalone mode -If you don't have the Docker CLI installed on the GitHub Runner, Buildx binary -is invoked directly, instead of calling it as a docker plugin. This can be -useful if you want to use the `kubernetes` driver in your self-hosted runner: - -```yaml -name: ci - -on: - push: - -jobs: - buildx: - runs-on: ubuntu-latest - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - with: - driver: kubernetes - - - name: Build - run: | - buildx build . -``` +This page has moved to [Docker Docs website](https://docs.docker.com/build/ci/github-actions/configure-builder/#standalone-mode)