Skip to content

Commit

Permalink
added buildx
Browse files Browse the repository at this point in the history
  • Loading branch information
aahel committed Feb 22, 2024
1 parent 81d4e5b commit dce8734
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/terraform-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ jobs:
with:
go-version: ${{ needs.get-go-version.outputs.go-version }}
cache-dependency-path: ./test/acceptance/go.sum
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@2a1a44ac4aa01993040736bd95bb470da1a38365 # v2.9.0
- name: Setup gotestsum
shell: bash
run: |
Expand Down
6 changes: 3 additions & 3 deletions consul-lambda/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ dev: dist
# So we enable build-kit in the individual targets.
# We can set this here one time, once we're off CircleCI.
# export DOCKER_BUILDKIT=1
BUILD_ARGS = BIN_NAME=consul-lambda-registrator VERSION=$(VERSION) GIT_COMMIT=$(GIT_COMMIT) GIT_DIRTY=$(GIT_DIRTY) ARCH=$(ARCH)
BUILD_ARGS = BIN_NAME=consul-lambda-registrator VERSION=$(VERSION) GIT_COMMIT=$(GIT_COMMIT) GIT_DIRTY=$(GIT_DIRTY)
TAG ?= $(BIN_NAME)/$(TARGET):$(VERSION)
BA_FLAGS = $(addprefix --build-arg=,$(BUILD_ARGS))
FLAGS = --target $(TARGET) --platform $(PLATFORM) --tag $(TAG) $(BA_FLAGS)
FLAGS = --load --platform $(PLATFORM) --tag $(TAG) $(BA_FLAGS)

# Set OS to linux for all docker/* targets.
docker: OS = linux
docker: TARGET = release-default
docker: dev # TODO
export DOCKER_BUILDKIT=1; docker build $(FLAGS) ./consul-lambda-registrator
docker buildx use default && docker buildx build $(FLAGS) ./consul-lambda-registrator
.PHONY: docker

0 comments on commit dce8734

Please sign in to comment.