|
14 | 14 | # limitations under the License. |
15 | 15 |
|
16 | 16 |
|
17 | | -# Prep: |
18 | | -# docker run --rm --privileged tonistiigi/binfmt --install all |
19 | | -# docker run --rm --privileged multiarch/qemu-user-static --reset -p yes |
20 | | -# Need to see "F" flag: cat /proc/sys/fs/binfmt_misc/qemu-* |
21 | | -# |
22 | | -# Build: |
23 | | -# docker buildx build --platform linux/s390x -t $IMAGE -f Dockerfile.bazel |
24 | | -# |
25 | | -# Push: |
26 | | -# docker image tag $IMAGE ghcr.io/proxy-wasm/$IMAGE |
27 | | -# docker push ghcr.io/proxy-wasm/$IMAGE |
28 | | -# |
29 | | -# Test: |
30 | | -# docker run --rm --volume $(pwd):/mnt --workdir /mnt \ |
31 | | -# --platform linux/s390x $IMAGE \ |
32 | | -# bazel test --verbose_failures --test_output=errors \ |
33 | | -# --define engine=null --config=clang --test_timeout=1800 \ |
34 | | -# -- //test/... |
| 17 | +# ============================================================================ |
| 18 | +# BUILD TOOLS DOCKER IMAGE WORKFLOWS |
| 19 | +# ============================================================================ |
| 20 | +# |
| 21 | +# This Dockerfile creates build tools images for cross-platform testing, |
| 22 | +# particularly for s390x architecture. Images are published to GitHub |
| 23 | +# Container Registry (ghcr.io/proxy-wasm/build-tools). |
| 24 | +# |
| 25 | +# ---------------------------------------------------------------------------- |
| 26 | +# RECOMMENDED: Automated Workflow (via GitHub Actions) |
| 27 | +# ---------------------------------------------------------------------------- |
| 28 | +# |
| 29 | +# The preferred method for publishing build tools images is through the |
| 30 | +# automated GitHub Actions workflow defined in: |
| 31 | +# .github/workflows/publish-build-tools.yml |
| 32 | +# |
| 33 | +# This workflow can be triggered manually via the GitHub UI: |
| 34 | +# 1. Go to Actions tab in the repository |
| 35 | +# 2. Select "Publish Build Tools Docker Image" |
| 36 | +# 3. Click "Run workflow" |
| 37 | +# 4. Provide the required inputs: |
| 38 | +# - ubuntu_version: Base Ubuntu version (e.g., 22.04, 24.04) |
| 39 | +# - bazel_version: Bazel version to build (e.g., 6.5.0, 7.0.0) |
| 40 | +# - platforms: Target platforms (default: linux/s390x) |
| 41 | +# - draft: Set to 'false' to build and push, 'true' for build-only testing |
| 42 | +# |
| 43 | +# The workflow handles QEMU setup, multi-platform builds, caching, and |
| 44 | +# authentication automatically. Images are tagged as: |
| 45 | +# ghcr.io/proxy-wasm/build-tools:ubuntu-{VERSION}-bazel-{VERSION} |
| 46 | +# |
| 47 | +# This automated approach is recommended because it: |
| 48 | +# - Ensures consistent build environments |
| 49 | +# - Handles authentication and permissions automatically |
| 50 | +# - Provides build caching for faster iterations |
| 51 | +# - Supports draft mode for testing before publishing |
| 52 | +# |
| 53 | +# ---------------------------------------------------------------------------- |
| 54 | +# ALTERNATIVE: Manual Build and Push |
| 55 | +# ---------------------------------------------------------------------------- |
| 56 | +# |
| 57 | +# For local development or when automated workflows are unavailable, |
| 58 | +# you can manually build and push images using the following steps: |
| 59 | +# |
| 60 | +# 1. Prep (enable cross-platform emulation): |
| 61 | +# docker run --rm --privileged tonistiigi/binfmt --install all |
| 62 | +# docker run --rm --privileged multiarch/qemu-user-static --reset -p yes |
| 63 | +# # Verify "F" flag: cat /proc/sys/fs/binfmt_misc/qemu-* |
| 64 | +# |
| 65 | +# 2. Build: |
| 66 | +# docker buildx build --platform linux/s390x \ |
| 67 | +# --build-arg UBUNTU_VERSION=22.04 \ |
| 68 | +# --build-arg BAZEL_VERSION=6.5.0 \ |
| 69 | +# -t build-tools:local \ |
| 70 | +# -f bazel/external/Dockerfile.bazel . |
| 71 | +# |
| 72 | +# 3. Push (requires appropriate permissions): |
| 73 | +# docker image tag build-tools:local \ |
| 74 | +# ghcr.io/proxy-wasm/build-tools:ubuntu-22.04-bazel-6.5.0 |
| 75 | +# docker push ghcr.io/proxy-wasm/build-tools:ubuntu-22.04-bazel-6.5.0 |
| 76 | +# |
| 77 | +# 4. Test: |
| 78 | +# docker run --rm --volume $(pwd):/mnt --workdir /mnt \ |
| 79 | +# --platform linux/s390x \ |
| 80 | +# ghcr.io/proxy-wasm/build-tools:ubuntu-22.04-bazel-6.5.0 \ |
| 81 | +# bazel test --verbose_failures --test_output=errors \ |
| 82 | +# --define engine=null --config=clang --test_timeout=1800 \ |
| 83 | +# -- //test/... |
| 84 | +# |
| 85 | +# ============================================================================ |
35 | 86 |
|
36 | 87 | # Update base image |
37 | 88 | ARG UBUNTU_VERSION=22.04 |
|
0 commit comments