This is an automated email from the ASF dual-hosted git repository.

jgemignani pushed a commit to branch PG15
in repository https://gitbox.apache.org/repos/asf/age.git


The following commit(s) were added to refs/heads/PG15 by this push:
     new 090ea4f5 Add hooks for multi-arch builds on dockerhub (#1683) (#1688)
090ea4f5 is described below

commit 090ea4f571907e2a0f8075d3c20e77d9131d54d6
Author: Muhammad Taha Naveed <[email protected]>
AuthorDate: Sat Mar 16 00:10:42 2024 +0500

    Add hooks for multi-arch builds on dockerhub (#1683) (#1688)
    
    - hooks/build overrides the default build command to use buildx and
      create an image for amd64 and arm64 archictectures. The arm64 build
      will take time to build as it is emulated using qemu.
    - hooks/push overrides the default push command to push the multi-arch
      images. The push is initiated from the buildx context since we have
      the push argument(--push) set in the buildx command.
---
 docker/hooks/build | 4 ++++
 docker/hooks/push  | 1 +
 2 files changed, 5 insertions(+)

diff --git a/docker/hooks/build b/docker/hooks/build
new file mode 100644
index 00000000..bd347d90
--- /dev/null
+++ b/docker/hooks/build
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+docker buildx create --name multiarch --use --platform 
linux/amd64,linux/arm64/v8
+docker buildx build ../ -t $IMAGE_NAME -f Dockerfile --platform 
linux/amd64,linux/arm64/v8 --push
\ No newline at end of file
diff --git a/docker/hooks/push b/docker/hooks/push
new file mode 100644
index 00000000..cc1f786e
--- /dev/null
+++ b/docker/hooks/push
@@ -0,0 +1 @@
+#!/bin/bash
\ No newline at end of file

Reply via email to