diff options
| author | Alexander Potapenko <glider@google.com> | 2026-02-11 15:33:00 +0100 |
|---|---|---|
| committer | Alexander Potapenko <glider@google.com> | 2026-02-11 17:47:34 +0000 |
| commit | 76a109e23e28a4d8e6e31029528eb3bb2189bfaa (patch) | |
| tree | e6e5f23d32f3498df4ab30b99ffb0d095610fd7c /tools/docker | |
| parent | c5fa3ef41c9a4a57c043a0597d892b372a8a40e8 (diff) | |
tools/docker: update README.md
Now that both Docker containers are multiarch, reflect that in the
documentation.
Diffstat (limited to 'tools/docker')
| -rw-r--r-- | tools/docker/README.md | 60 |
1 files changed, 42 insertions, 18 deletions
diff --git a/tools/docker/README.md b/tools/docker/README.md index f584323bc..7d812b4fa 100644 --- a/tools/docker/README.md +++ b/tools/docker/README.md @@ -14,31 +14,55 @@ docker pull gcr.io/syzkaller/env docker run -it gcr.io/syzkaller/env ``` -To build and push a new version: -``` -DOCKER_BUILDKIT=1 docker build -t gcr.io/syzkaller/env tools/docker/env -gcloud auth login && gcloud auth configure-docker -docker push gcr.io/syzkaller/env -``` +## Building Multi-arch Images -[DEPRECATED] Github packages are not supported (if you can't access gcr.io, please contact us) -``` -docker tag gcr.io/syzkaller/env docker.pkg.github.com/google/syzkaller/env -docker login https://docker.pkg.github.com -docker push docker.pkg.github.com/google/syzkaller/env -``` - -## Syzbot image +The `syzbot` and `env` images support multiple architectures (amd64, arm64). To build and push them, we use [Docker buildx](https://docs.docker.com/build/building/multi-platform/) to build a multi-arch image in a way that allows distributing it under one tag name. -The syzbot image supports two architectures (arm64, amd64), so we need to build it with care. +### 1. One-time Setup -The example below uses [the standard Docker functionality](https://docs.docker.com/build/building/multi-platform/) to build a -multi-arch image in a way that allows to distribute it under one tag names. +Install the QEMU emulators and create a new builder instance: ```bash +# Install QEMU emulators for multi-arch support docker run --privileged --rm tonistiigi/binfmt --install all + +# Create and bootstrap a new builder docker buildx create --name mybuilder --driver docker-container --bootstrap docker buildx use mybuilder +``` + +### 2. Build and Push + +Once the builder is configured, you can build and push the images. Ensure you are authenticated with Google Cloud: + +```bash gcloud auth login && gcloud auth configure-docker -docker buildx build --platform linux/amd64,linux/arm64 -t gcr.io/syzkaller/syzbot tools/docker/syzbot --push +``` + +**Building the `syzbot` image:** + +```bash +docker buildx build --platform linux/amd64,linux/arm64 \ + -t gcr.io/syzkaller/syzbot \ + tools/docker/syzbot \ + --push +``` + +**Building the `env` image:** + +```bash +docker buildx build --platform linux/amd64,linux/arm64 \ + -t gcr.io/syzkaller/env \ + tools/docker/env \ + --push +``` + +## [DEPRECATED] Github Packages + +Github packages are not supported (if you can't access gcr.io, please contact us). + +``` +docker tag gcr.io/syzkaller/env [docker.pkg.github.com/google/syzkaller/env](https://docker.pkg.github.com/google/syzkaller/env) +docker login [https://docker.pkg.github.com](https://docker.pkg.github.com) +docker push [docker.pkg.github.com/google/syzkaller/env](https://docker.pkg.github.com/google/syzkaller/env) ``` |
