diff --git a/helpful_tools/GitHubActions/README.md b/helpful_tools/GitHubActions/README.md new file mode 100644 index 0000000..1f49cc8 --- /dev/null +++ b/helpful_tools/GitHubActions/README.md @@ -0,0 +1,5 @@ +# BuildKit GitHub Actions Example + +[Docker is pinned to v24.0.7](https://github.com/actions/runner-images/issues/9478) on GitHub Actions hosted Windows runners, so containerd and BuildKit need to be installed manually. + +This [workflow file](./install_buildkit_workflow.yaml) can be used as an example. diff --git a/helpful_tools/GitHubActions/install_buildkit_workflow.yaml b/helpful_tools/GitHubActions/install_buildkit_workflow.yaml new file mode 100644 index 0000000..9dc1143 --- /dev/null +++ b/helpful_tools/GitHubActions/install_buildkit_workflow.yaml @@ -0,0 +1,33 @@ +name: Build + +on: + push: + +jobs: + main: + runs-on: windows-latest + steps: + - name: Setup containerd + run: | + $version = "1.7.15" + curl.exe -L https://github.com/containerd/containerd/releases/download/v$version/containerd-$version-windows-amd64.tar.gz -o containerd.tar.gz + tar.exe xvf containerd.tar.gz + + .\bin\containerd.exe --register-service + Start-Service containerd + - name: Setup BuildKit + run: | + $version = "v0.13.1" + curl.exe -L https://github.com/moby/buildkit/releases/download/$version/buildkit-$version.windows-amd64.tar.gz -o buildkit.tar.gz + tar.exe xvf buildkit.tar.gz + + .\bin\buildkitd.exe --register-service + Start-Service buildkitd + - name: Setup Docker Buildx + run: | + $version = "v0.13.1" + curl.exe -L https://github.com/docker/buildx/releases/download/$version/buildx-$version.windows-amd64.exe -o $env:ProgramData\Docker\cli-plugins\docker-buildx.exe + - uses: docker/setup-buildx-action@v3.2.0 + with: + driver: remote + endpoint: npipe:////./pipe/buildkitd \ No newline at end of file diff --git a/helpful_tools/README.md b/helpful_tools/README.md index 84abaab..38583e7 100644 --- a/helpful_tools/README.md +++ b/helpful_tools/README.md @@ -16,6 +16,7 @@ A container runtime is software that executes containers and manages container i - Handles the complete container lifecycle, including image transfer and storage, container execution and supervision, and low-level storage and network attachments. - Use containerd when you need an efficient runtime, particularly in resource-constrained environments like embedded systems or IoT devices, or when embedding into a larger system. #### [👉 Install ContainerD with PowerShell](https://github.com/microsoft/Windows-Containers/tree/Main/helpful_tools/Install-ContainerdRuntime) +#### [👉 Install ContainerD and BuildKit on GitHub Actions](./GitHubActions/) ## System Information Tools ### 3. Query Job Limits