Skip to content

*: Support building multi-arch image#175

Merged
hawkingrei merged 1 commit intopingcap:masterfrom
pingyu:multiarch
Mar 8, 2024
Merged

*: Support building multi-arch image#175
hawkingrei merged 1 commit intopingcap:masterfrom
pingyu:multiarch

Conversation

@pingyu
Copy link
Copy Markdown
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
Copy Markdown

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
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