-
Notifications
You must be signed in to change notification settings - Fork 16
Use buildx to support multi-arch images #86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ TAGS ?= 81 81-fpm 81-unit 82 82-fpm 82-unit | |
COMPOSER_HASH ?= 55ce33d7678c5a611085589f1f3ddf8b3c52d662cd01d4ba75c0ee0459970c2200a51f492d557530c71c15d8dba01eae | ||
DRUSH_VERSION ?= 8.4.12 | ||
DOCKER_BUILDKIT ?= 1 | ||
PLATFORM ?= linux/amd64 | ||
PLATFORM ?= linux/amd64,linux/arm64 | ||
|
||
.PHONY: all build push | ||
|
||
|
@@ -14,7 +14,6 @@ build: | |
@echo "Building images for tags: $(TAGS)" | ||
set -e; for i in $(TAGS); do printf "\nBuilding $(NAME):$$i \n\n"; cd php$$i; \ | ||
DOCKER_BUILDKIT=$(DOCKER_BUILDKIT) docker build -t $(NAME):$$i \ | ||
--platform $(PLATFORM) \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this option is available because There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Otherwise it needs just to replace There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From my experience, simple There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I mean we just need to remove usage of |
||
--no-cache --progress=plain \ | ||
--build-arg COMPOSER_HASH=$(COMPOSER_HASH) \ | ||
--build-arg DRUSH_VERSION=$(DRUSH_VERSION) \ | ||
|
@@ -28,3 +27,15 @@ push: | |
|
||
unit: | ||
make -C unit-php-builder/dev build | ||
|
||
buildx-push: | ||
@echo "Building and pushing images for tags: $(TAGS)" | ||
set -e; for i in $(TAGS); do printf "\nBuilding $(NAME):$$i \n\n"; cd php$$i; \ | ||
docker buildx build -t $(NAME):$$i --push \ | ||
--platform $(PLATFORM) \ | ||
--no-cache --progress=plain \ | ||
--build-arg COMPOSER_HASH=$(COMPOSER_HASH) \ | ||
--build-arg DRUSH_VERSION=$(DRUSH_VERSION) \ | ||
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ | ||
--build-arg VCS_REF=`git rev-parse --short HEAD` .; \ | ||
cd ..; done |
Uh oh!
There was an error while loading. Please reload this page.