Conversation
There was a problem hiding this comment.
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
amd64fromTARGETARCHbuild argument - Added
TARGETOSbuild argument to support different operating systems - Updated binary path in COPY instruction to use both
TARGETOSandTARGETARCHvariables
💡 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 |
There was a problem hiding this comment.
can you add default os and arch?
There was a problem hiding this comment.
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
Docker build was hardcoded for
amd64only