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

*: Support building multi-arch image #175

Merged
merged 1 commit into from
Mar 8, 2024
Merged

Conversation

pingyu
Copy link
Contributor

@pingyu pingyu commented Mar 7, 2024

Manual Test

> make docker-buildx IMG=hub.pingcap.net/go-tpc/go-tpc:latest
...
...
 => [linux/arm64 builder 7/7] RUN GOOS=linux GOARCH=arm64 make build                                                                                                                                                                                                                             114.1s
 => [linux/amd64 builder 6/7] COPY . .                                                                                                                                                                                                                                                             0.1s
 => [linux/amd64 builder 7/7] RUN GOOS=linux GOARCH=amd64 make build                                                                                                                                                                                                                              10.5s
 => [linux/amd64 stage-1 3/3] COPY --from=builder /workspace/bin/go-tpc /go-tpc                                                                                                                                                                                                                    0.0s
 => [linux/arm64 stage-1 3/3] COPY --from=builder /workspace/bin/go-tpc /go-tpc                                                                                                                                                                                                                    0.1s
 => exporting to image                                                                                                                                                                                                                                                                            11.4s
...
...
image

Regression Test:

> make docker-build
...
...
 => [stage-1 2/3] RUN apk add --no-cache   dumb-init   tzdata   mariadb-client                                                                                                                                                                                                   37.0s
 => [builder 2/7] WORKDIR /workspace                                                                                                                                                                                                                                              0.6s 
 => [builder 3/7] COPY go.mod go.mod                                                                                                                                                                                                                                              0.0s
 => [builder 4/7] COPY go.sum go.sum                                                                                                                                                                                                                                              0.0s
 => [builder 5/7] RUN go mod download                                                                                                                                                                                                                                             4.4s
 => [builder 6/7] COPY . .                                                                                                                                                                                                                                                        0.1s
 => [builder 7/7] RUN GOOS=linux GOARCH=amd64 make build                                                                                                                                                                                                                         11.0s
 => [stage-1 3/3] COPY --from=builder /workspace/bin/go-tpc /go-tpc                                                                                                                                                                                                               0.0s
 => exporting to image                                                                                                                                                                                                                                                            0.5s
 => => exporting layers                                                                                                                                                                                                                                                           0.5s
 => => writing image sha256:8e411f671534ce7c987794abdedc8b5b882563ed3fb7c8f15302732c94ec460e                                                                                                                                                                                      0.0s
 => => naming to docker.io/library/go-tpc:latest                                                                                                                                                                                                                                  0.0s
...
...

Signed-off-by: Ping Yu <yuping@pingcap.com>
@CLAassistant
Copy link

CLAassistant commented Mar 7, 2024

CLA assistant check
All committers have signed the CLA.

@hawkingrei hawkingrei merged commit c395f5d into pingcap:master Mar 8, 2024
2 checks passed
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.

3 participants