Skip to content

Conversation

Copy link

Copilot AI commented Jan 8, 2026

Enables building Docker images for both linux/amd64 and linux/arm64 platforms in a single workflow run.

Workflow Changes

  • Added QEMU and Docker Buildx setup steps for multi-platform builds
  • Removed separate Go build step (buildx handles cross-compilation)
  • Added platforms: linux/amd64,linux/arm64 to build-push action

Dockerfile Changes

  • Converted to multi-stage build (builder + runtime stages)
  • Added architecture-aware dumb-init binary selection using TARGETARCH:
    ARG TARGETARCH
    RUN case ${TARGETARCH} in \
            "amd64")  DUMB_INIT_ARCH=x86_64  ;; \
            "arm64")  DUMB_INIT_ARCH=aarch64  ;; \
        esac && \
        wget -O /usr/local/bin/dumb-init \
          https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_${DUMB_INIT_ARCH}
  • Removed delve debugger from production image

Images are pushed as a manifest list; Docker automatically pulls the correct architecture for the host platform.

Original prompt

Modify docker-publish.yml workflow to build multi-arch images (arm, x86)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Update docker-publish.yml for multi-arch image builds Add multi-arch Docker image builds (amd64, arm64) Jan 8, 2026
Copilot AI requested a review from xDarksome January 8, 2026 09:42
@xDarksome xDarksome marked this pull request as ready for review January 8, 2026 10:33
Copilot AI review requested due to automatic review settings January 8, 2026 10:33
@xDarksome xDarksome merged commit 10c80d7 into master Jan 8, 2026
12 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enables building multi-architecture Docker images for both AMD64 and ARM64 platforms in a single workflow run, modernizing the build process for broader platform support.

Key Changes:

  • Converted Dockerfile to a multi-stage build with separate builder and runtime stages
  • Added QEMU and Docker Buildx setup to the GitHub Actions workflow for cross-platform builds
  • Implemented architecture-aware dumb-init binary selection using Docker's TARGETARCH build argument

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
images/Dockerfile.prom2parquet Converted to multi-stage build with architecture-aware dumb-init download; removed delve debugger from production image
.github/workflows/docker-publish.yml Added QEMU and Buildx setup; removed separate Go build step; configured multi-platform builds

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"arm64") DUMB_INIT_ARCH=aarch64 ;; \
*) echo "Unsupported architecture: ${TARGETARCH}" && exit 1 ;; \
esac && \
wget -O /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_${DUMB_INIT_ARCH} && \
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This RUN step downloads a precompiled dumb-init binary over HTTPS and executes it as PID 1 without any integrity verification (no checksum or signature check), creating a supply-chain risk if the GitHub release or delivery path is ever compromised. An attacker who can influence the downloaded binary could gain code execution inside every built container that uses this image. To mitigate this, pin the binary with a strong checksum or signature (or install via a trusted package source or vendored artifact) and verify it before making it executable.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants