Skip to content

Commit

Permalink
ver: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ptx96 committed Jun 9, 2021
1 parent d331815 commit a95040d
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Choose kubectl version from tagged commit;
# if no tag comes out, it will use "stable" binary
KUBECTL_VERSION ?= $$(git describe --abbrev=0 --tags || curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)

# Image URL to use while building/pushing image targets
IMG ?= quay.io/clastix/kubectl:$(KUBECTL_VERSION)

# Supported platforms for multiarch docker image
PLATFORMS ?= linux/amd64,linux/arm64,linux/arm

# Build the docker image
docker-build:
docker build . -t ${IMG} --build-arg KUBECTL_VERSION=$(KUBECTL_VERSION)

# Push the docker image
docker-push:
docker push ${IMG}

# Build multiarch docker image with "docker buildx" and push it
docker-buildx-push:
docker buildx build . -t ${IMG} --build-arg KUBECTL_VERSION=${KUBECTL_VERSION} \
--platform ${PLATFORMS} \
--push

# Check docker image manifest
docker-check-manifest:
docker manifest inspect ${IMG}

0 comments on commit a95040d

Please sign in to comment.