Skip to content

Commit e5a98f8

Browse files
authored
Merge pull request kubernetes#125105 from BenTheElder/pause-build
pause: containerize wincat build
2 parents 028b457 + 7aa5693 commit e5a98f8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

build/pause/Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,13 @@ bin/${BIN.linux}-$(OS)-$(ARCH): $(SRCS)
118118
$(TRIPLE)-strip $(foreach binary, $@, ${binary}${EXTENSION})"
119119

120120
bin/wincat-windows-${ARCH}: windows/wincat/wincat.go
121-
CGO_ENABLED=0 GOOS=windows GOARCH=${ARCH} go build -o $@ $^
121+
mkdir -p bin
122+
docker run --rm -u $$(id -u):$$(id -g) -v $$(pwd):/build \
123+
--tmpfs /.cache \
124+
$(KUBE_CROSS_IMAGE):$(KUBE_CROSS_VERSION) \
125+
/bin/bash -c "\
126+
cd /build && \
127+
CGO_ENABLED=0 GOOS=windows GOARCH=${ARCH} go build -o $@ $^"
122128

123129
container: .container-${OS}-$(ARCH)
124130
.container-linux-$(ARCH): bin/$(BIN)-$(OS)-$(ARCH)

0 commit comments

Comments
 (0)