Skip to content

Commit

Permalink
chore: ensure build docker image with latest atlas (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
giautm authored Oct 3, 2024
1 parent cbe2593 commit 2566baa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ATLAS_VERSION=$(shell curl -s https://release.ariga.io/atlas/atlas-linux-amd64-latest.version)

# Image URL to use all building/pushing image targets
IMG ?= controller:latest
KIND_CLUSTER ?= kind
Expand Down Expand Up @@ -115,7 +117,7 @@ run: manifests generate fmt vet ## Run a controller from your host.
# More info: https://docs.docker.com/develop/develop-images/build_enhancements/
.PHONY: docker-build
docker-build: ## Build docker image with the manager.
$(CONTAINER_TOOL) build -t ${IMG} .
$(CONTAINER_TOOL) build --build-arg ATLAS_VERSION=${ATLAS_VERSION} -t ${IMG} .

.PHONY: docker-push
docker-push: ## Push docker image with the manager.
Expand All @@ -134,7 +136,7 @@ docker-buildx: ## Build and push docker image for the manager for cross-platform
sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross
- $(CONTAINER_TOOL) buildx create --name project-v4-builder
$(CONTAINER_TOOL) buildx use project-v4-builder
- $(CONTAINER_TOOL) buildx build --push --platform=$(PLATFORMS) --tag ${IMG} -f Dockerfile.cross .
- $(CONTAINER_TOOL) buildx build --push --platform=$(PLATFORMS) --build-arg ATLAS_VERSION=${ATLAS_VERSION} --tag ${IMG} -f Dockerfile.cross .
- $(CONTAINER_TOOL) buildx rm project-v4-builder
rm Dockerfile.cross

Expand Down

0 comments on commit 2566baa

Please sign in to comment.