Skip to content

Commit

Permalink
Merge pull request #39 from cert-manager/multi-arch-docker-images
Browse files Browse the repository at this point in the history
multi-arch docker images
  • Loading branch information
jetstack-bot authored Apr 18, 2023
2 parents acb5e00 + a407cef commit a888e29
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0

-
name: Log in to GitHub Container Registry
uses: docker/login-action@v1
Expand All @@ -20,10 +21,8 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build Docker image
run: make docker-build
-
name: Push Docker image
run: make docker-push
run: make docker-buildx

-
name: Create install.yaml file
run: make build/install.yaml
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,10 @@ docker-push: ## Push docker image with the manager.
# - have enable BuildKit, More info: https://docs.docker.com/develop/develop-images/build_enhancements/
# - be able to push the image for your registry (i.e. if you do not inform a valid value via IMG=<myregistry/image:<tag>> then the export will fail)
# To properly provided solutions that supports more than one platform you should use this option.
PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le
# Other platforms include: linux/s390x,linux/ppc64le
PLATFORMS ?= linux/arm64,linux/amd64
.PHONY: docker-buildx
docker-buildx: test ## Build and push docker image for the manager for cross-platform support
docker-buildx: ## Build and push docker image for the manager for cross-platform support
# copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile
sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross
- docker buildx create --name project-v3-builder
Expand Down

0 comments on commit a888e29

Please sign in to comment.