Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Docker Build Compilation & Enable ARM64 Platform Support #20

Merged
merged 3 commits into from
Feb 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:

# Upload artifacts
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4.6.0
with:
name: binaries
path: build/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
with:
context: .
file: ./Dockerfile
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
pull: true
push: true
labels: |
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM golang:alpine AS builder
WORKDIR /src

# Copy go mod and project files
COPY go.* .
COPY go.* ./
Copy link
Member

Choose a reason for hiding this comment

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

Interesting. Does this occur build failure? It was working with no errors on amd64

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried on arm64 and it fails with:

Step 1/11 : FROM golang:alpine AS builder
alpine: Pulling from library/golang
6e771e15690e: Pull complete
14aa1d43e92f: Pull complete
e18364ce0d25: Pull complete
4d476c939a05: Pull complete
4f4fb700ef54: Pull complete
Digest: sha256:2d40d4fc278dad38be0777d5e2a88a2c6dee51b0b29c97a764fc6c6a11ca893c
Status: Downloaded newer image for golang:alpine
 ---> d3f5bd625c1b
Step 2/11 : WORKDIR /src
 ---> Running in 6c0220b22067
 ---> Removed intermediate container 6c0220b22067
 ---> b7387e427a20
Step 3/11 : COPY go.* .
When using COPY with more than one source file, the destination must be a directory and end with a /

RUN go mod download
COPY . .

Expand Down
Loading