Skip to content

Commit

Permalink
fix: make docker-multiarch failed with vendor errors
Browse files Browse the repository at this point in the history
Signed-off-by: haoshi.ren <haoshi.ren@smartx.com>
  • Loading branch information
haoshi.ren committed Apr 29, 2024
1 parent 353d334 commit ea20f67
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Dockerfile_multiarch
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ COPY main.go main.go
COPY apis/ apis/
COPY cmd/ cmd/
COPY pkg/ pkg/
COPY vendor/ vendor/

# Build
ARG TARGETOS
ARG TARGETARCH
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} CGO_ENABLED=0 GO111MODULE=on go build -mod=vendor -a -o manager main.go \
&& GOOS=${TARGETOS} GOARCH=${TARGETARCH} CGO_ENABLED=0 GO111MODULE=on go build -mod=vendor -a -o daemon ./cmd/daemon/main.go
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} CGO_ENABLED=0 GO111MODULE=on go build -a -o manager main.go \
&& GOOS=${TARGETOS} GOARCH=${TARGETARCH} CGO_ENABLED=0 GO111MODULE=on go build -a -o daemon ./cmd/daemon/main.go


ARG BASE_IMAGE
Expand Down

0 comments on commit ea20f67

Please sign in to comment.