Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mattdurham committed Jul 12, 2021
1 parent 84303ac commit 2c56ddc
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,11 @@ docker-build = docker build $(DOCKER_BUILD_FLAGS)

ifeq ($(CROSS_BUILD),true)
DOCKERFILE = Dockerfile.buildx
docker-build = docker buildx build --push --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 $(DOCKER_BUILD_FLAGS)
endif


########
# CRDs #
# CRDs #
########

crds:
Expand Down Expand Up @@ -134,6 +133,7 @@ agentctl: cmd/agentctl/agentctl
agent-operator: cmd/agent-operator/agent-operator

# TargetPlatform is set by the buildx

cmd/agent/agent: cmd/agent/main.go
ifeq ($(TARGETPLATFORM),normal)
export CGO_ENABLED=1 GO111MODULE=auto; go build $(CGO_FLAGS) -o $@ ./$(@D)
Expand Down Expand Up @@ -181,13 +181,12 @@ endif


agent-image:
$(docker-build) -t $(IMAGE_PREFIX)/agent:latest -t $(IMAGE_PREFIX)/agent:$(IMAGE_TAG) -f cmd/agent/$(DOCKERFILE) .

docker buildx build --push --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 $(DOCKER_BUILD_FLAGS) -t $(IMAGE_PREFIX)/agent:latest -t $(IMAGE_PREFIX)/agent:$(IMAGE_TAG) -f cmd/agent/$(DOCKERFILE) .
agentctl-image:
$(docker-build) -t $(IMAGE_PREFIX)/agentctl:latest -t $(IMAGE_PREFIX)/agent:$(IMAGE_TAG) -f cmd/agentctl/$(DOCKERFILE) .

docker buildx build --push --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 $(DOCKER_BUILD_FLAGS) -t $(IMAGE_PREFIX)/agentctl:latest -t $(IMAGE_PREFIX)/agent:$(IMAGE_TAG) -f cmd/agentctl/$(DOCKERFILE) .
agent-operator-image:
$(docker-build) -t $(IMAGE_PREFIX)/agent-operator:latest -t $(IMAGE_PREFIX)/agent-operator:$(IMAGE_TAG) -f cmd/agent-operator/$(DOCKERFILE) .
docker buildx build --push --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 $(DOCKER_BUILD_FLAGS) -t $(IMAGE_PREFIX)/agent-operator:latest -t $(IMAGE_PREFIX)/agent-operator:$(IMAGE_TAG) -f cmd/agent-operator/$(DOCKERFILE) .


install:
CGO_ENABLED=1 go install $(CGO_FLAGS) ./cmd/agent
Expand Down

0 comments on commit 2c56ddc

Please sign in to comment.