Skip to content

Commit 600f092

Browse files
fix: build all binaries for the target OS/ARCH (#49)
#### Motivation Fix the multi-arch builds so that all binaries are built for the target OS/ARCH. Currently, only the `puller` is built for the target. #### Modifications - export GOOS and GOARCH within multi-command RUN that builds the binaries #### Result Signed-off-by: Travis Johnson <[email protected]>
1 parent b3dcdcc commit 600f092

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ ARG TARGETARCH
116116
# https://www.docker.com/blog/faster-multi-platform-builds-dockerfile-cross-compilation-guide/
117117
RUN --mount=type=cache,target=/root/.cache/go-build \
118118
--mount=type=cache,target=/go/pkg \
119-
GOOS=${TARGETOS:-linux} \
120-
GOARCH=${TARGETARCH:-amd64} \
119+
export GOOS=${TARGETOS:-linux} && \
120+
export GOARCH=${TARGETARCH:-amd64} && \
121121
go build -o puller model-serving-puller/main.go && \
122122
go build -o triton-adapter model-mesh-triton-adapter/main.go && \
123123
go build -o mlserver-adapter model-mesh-mlserver-adapter/main.go && \

0 commit comments

Comments
 (0)