Skip to content

Commit

Permalink
feat: allow override of buildx builder
Browse files Browse the repository at this point in the history
  • Loading branch information
bitwalker committed Jan 27, 2021
1 parent 76b85c4 commit 8c8fe50
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ YAML_DROP_PREFIX=spec.validation.openAPIV3Schema.properties.spec.properties

# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
CRD_OPTIONS ?= "crd:trivialVersions=true"
BUILDX_BUILDER ?= container-builder

# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
Expand Down Expand Up @@ -105,8 +106,8 @@ docker-push:

docker-buildx:
export DOCKER_CLI_EXPERIMENTAL=enabled
@if ! docker buildx ls | grep -q container-builder; then\
docker buildx create --platform ${PLATFORMS} --name container-builder --use;\
@if ! docker buildx ls | grep -q $(BUILDX_BUILDER); then\
docker buildx create --platform ${PLATFORMS} --name $(BUILDX_BUILDER) --use;\
fi
docker buildx build --platform ${PLATFORMS} \
--build-arg RUNNER_VERSION=${RUNNER_VERSION} \
Expand Down

0 comments on commit 8c8fe50

Please sign in to comment.