Skip to content

Commit

Permalink
[feature] add multi-arch images
Browse files Browse the repository at this point in the history
  • Loading branch information
duncdrum committed Nov 13, 2024
1 parent f2981e1 commit ee5a8d9
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ jobs:
name: Build and Test Images
runs-on: ubuntu-latest
# NOTE (DP): Publish on develop and master, test on PRs against these
# TODO(DP) Reinstate CRONed release builds to update stock apps regularly
if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master' || github.base_ref == 'develop' || github.base_ref == 'master'
steps:
- uses: actions/checkout@v4
Expand All @@ -15,6 +16,10 @@ jobs:
with:
distribution: liberica
java-version: '8'
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: linux/amd64,linux/arm64
- name: Make buildkit default
uses: docker/setup-buildx-action@v3
id: buildx
Expand Down
52 changes: 40 additions & 12 deletions exist-docker/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
Expand All @@ -42,14 +44,15 @@
<connection>scm:git:https://github.com/exist-db/exist.git</connection>
<developerConnection>scm:git:https://github.com/exist-db/exist.git</developerConnection>
<url>scm:git:https://github.com/exist-db/exist.git</url>
<tag>HEAD</tag>
</scm>
<tag>HEAD</tag>
</scm>

<properties>
<assemble.dir>${project.build.directory}/exist-docker-${project.version}-docker-dir</assemble.dir>
<exist.uber.jar.filename>exist.uber.jar</exist.uber.jar.filename>
<docker.tag>latest</docker.tag>
<docker.debug.tag>debug</docker.debug.tag>
<docker.platforms>linux/amd64, linux/arm64</docker.platforms>
</properties>

<dependencies>
Expand Down Expand Up @@ -106,7 +109,9 @@
<configuration>
<failOnWarning>true</failOnWarning>
<ignoredUnusedDeclaredDependencies>
<ignoredUnusedDeclaredDependency>${project.groupId}:exist-distribution:pom:${project.version}</ignoredUnusedDeclaredDependency> <!-- needed at runtime to support lucene query syntax -->
<ignoredUnusedDeclaredDependency>
${project.groupId}:exist-distribution:pom:${project.version}</ignoredUnusedDeclaredDependency> <!--
needed at runtime to support lucene query syntax -->
</ignoredUnusedDeclaredDependencies>
</configuration>
</execution>
Expand All @@ -124,7 +129,8 @@
<goal>single</goal>
</goals>
<configuration>
<archiveBaseDirectory>${project.basedir}/../exist-distribution/target/exist-distribution-${project.version}-dir</archiveBaseDirectory>
<archiveBaseDirectory>
${project.basedir}/../exist-distribution/target/exist-distribution-${project.version}-dir</archiveBaseDirectory>
<attach>false</attach>
<descriptors>
<descriptor>src/assembly/dist-assembly-docker.xml</descriptor>
Expand Down Expand Up @@ -183,17 +189,28 @@
</filter>
</filters>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer" />
<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer">
<transformer
implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer" />
<transformer
implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer">
<addHeader>false</addHeader>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<transformer
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/mailcap</resource>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<transformer
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/mailcap.default</resource>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
<transformer
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Multi-Release>true</Multi-Release>
</manifestEntries>
</transformer>
</transformers>
</configuration>
</execution>
Expand All @@ -205,12 +222,18 @@
<artifactId>docker-maven-plugin</artifactId>
<version>0.40.3</version>
<configuration>
<verbose>true</verbose>
<verbose>true</verbose>
<pushRegistry>registry.hub.docker.com</pushRegistry>
<images>
<image>
<name>existdb/existdb:%v</name>
<alias>exist</alias>
<build>
<buildx>
<platforms>
<platform>${docker.platforms}</platform>
</platforms>
</buildx>
<tags>
<tag>${docker.tag}</tag>
</tags>
Expand All @@ -222,6 +245,11 @@
<name>existdb/existdb:%v-DEBUG</name>
<alias>exist-debug</alias>
<build>
<buildx>
<platforms>
<platform>${docker.platforms}</platform>
</platforms>
</buildx>
<tags>
<tag>${docker.debug.tag}</tag>
</tags>
Expand Down Expand Up @@ -251,4 +279,4 @@

</plugins>
</build>
</project>
</project>

0 comments on commit ee5a8d9

Please sign in to comment.