Skip to content

Conversation

@hilariocoelho
Copy link

Docker build was hardcoded for amd64 only

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 fixes the Docker build configuration to properly support multi-architecture builds instead of being hardcoded for amd64 only.

Changes:

  • Removed hardcoded default value amd64 from TARGETARCH build argument
  • Added TARGETOS build argument to support different operating systems
  • Updated binary path in COPY instruction to use both TARGETOS and TARGETARCH variables

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

# Build arguments for multi-architecture support
ARG TARGETARCH=amd64
ARG TARGETOS
ARG TARGETARCH
Copy link
Contributor

Choose a reason for hiding this comment

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

can you add default os and arch?

Copy link
Author

Choose a reason for hiding this comment

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

What do you mean exactly with "default os and arch"? Those built arguments are already filled on docker buildx by specifying --platform argument (ie: docker build . --platform linux/amd64 --platform linux/arm64).

When setting ARG TARGETARCH=amd64, only amd64 binary is being included on both containers (linux/amd64 and linux/arm64).

On the github action it is already prepared for linux/amd64 and linux/arm64

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