mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-10-22 00:40:11 +00:00
make in_docker work again (#1830)
This commit is contained in:
5
Makefile
5
Makefile
@@ -35,17 +35,16 @@ ifeq (in_docker,$(firstword $(MAKECMDGOALS)))
|
||||
$(eval $(MAKE_ARGS):;@:)
|
||||
|
||||
in_docker:
|
||||
@[ "1" -eq "$(shell docker image ls woodpecker/make:local -a | wc -l)" ] && docker build -f ./docker/Dockerfile.make -t woodpecker/make:local . || echo reuse existing docker image
|
||||
@[ "1" -eq "$(shell docker image ls woodpecker/make:local -a | wc -l)" ] && docker buildx build -f ./docker/Dockerfile.make -t woodpecker/make:local --load . || echo reuse existing docker image
|
||||
@echo run in docker:
|
||||
@docker run -it \
|
||||
--user $(shell id -u):$(shell id -g) \
|
||||
-e VERSION="$(VERSION)" \
|
||||
-e BUILD_VERSION="$(BUILD_VERSION)" \
|
||||
-e CI_COMMIT_SHA="$(CI_COMMIT_SHA)" \
|
||||
-e GO_PACKAGES="$(GO_PACKAGES)" \
|
||||
-e TARGETOS="$(TARGETOS)" \
|
||||
-e TARGETARCH="$(TARGETARCH)" \
|
||||
-e CGO_ENABLED="$(CGO_ENABLED)"
|
||||
-e CGO_ENABLED="$(CGO_ENABLED)" \
|
||||
-e GOPATH=/tmp/go \
|
||||
-e HOME=/tmp/home \
|
||||
-v $(PWD):/build --rm woodpecker/make:local make $(MAKE_ARGS)
|
||||
|
||||
Reference in New Issue
Block a user