You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@knox.apache.org by mo...@apache.org on 2023/12/02 20:50:33 UTC
(knox) branch master updated: KNOX-2989 - Multi arch support for Knox images (#822)
This is an automated email from the ASF dual-hosted git repository.
more pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/knox.git
The following commit(s) were added to refs/heads/master by this push:
new 6f89529f0 KNOX-2989 - Multi arch support for Knox images (#822)
6f89529f0 is described below
commit 6f89529f0ecec8b6021eecfb814d7d436b4251fa
Author: Sandeep Moré <mo...@gmail.com>
AuthorDate: Sat Dec 2 15:50:28 2023 -0500
KNOX-2989 - Multi arch support for Knox images (#822)
---
gateway-docker/pom.xml | 85 +++++++++++++++++++++++++++++---------------------
pom.xml | 27 +++++++++++++++-
2 files changed, 76 insertions(+), 36 deletions(-)
diff --git a/gateway-docker/pom.xml b/gateway-docker/pom.xml
index c3889249a..e2d8d7353 100644
--- a/gateway-docker/pom.xml
+++ b/gateway-docker/pom.xml
@@ -34,6 +34,10 @@
<groupId>org.apache.knox</groupId>
<artifactId>gateway-release</artifactId>
</dependency>
+ <dependency>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ </dependency>
</dependencies>
<build>
<plugins>
@@ -59,7 +63,12 @@
</plugins>
</build>
<profiles>
- <!-- Profile for building official Docker images. Not bound to build phases since that would require anyone build to have the Docker engine installed on their machine -->
+ <!--
+ Profile for building official Docker images.
+ Not bound to build phases since that would require anyone build to have the
+ Docker engine installed on their machine.
+ Builds multi arch docker images, based on ${docker.platforms} property see: https://dmp.fabric8.io/#docker:build
+ -->
<profile>
<id>docker</id>
<build>
@@ -89,47 +98,53 @@
</executions>
</plugin>
<plugin>
- <groupId>com.spotify</groupId>
- <artifactId>dockerfile-maven-plugin</artifactId>
- <version>${dockerfile-maven-plugin.version}</version>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <version>${docker-maven-plugin.version}</version>
<configuration>
- <contextDirectory>${project.build.outputDirectory}/docker</contextDirectory>
- <buildArgs>
- <RELEASE_FILE>knox-${project.version}.zip</RELEASE_FILE>
- </buildArgs>
+ <images>
+ <image>
+ <alias>knox-gateway-buildx</alias>
+ <name>knox-gateway:${project.version}</name>
+
+ <build>
+ <contextDir>${project.build.outputDirectory}/docker</contextDir>
+ <args>
+ <RELEASE_FILE>knox-${project.version}.zip</RELEASE_FILE>
+ <ENTRYPOINT>gateway-entrypoint.sh</ENTRYPOINT>
+ <EXPOSE_PORT>8443</EXPOSE_PORT>
+ </args>
+ <entryPoint>gateway-entrypoint.sh</entryPoint>
+ <buildx>
+ <platforms>
+ <platform>${docker.platforms}</platform>
+ </platforms>
+ </buildx>
+ </build>
+ </image>
+
+ <image>
+ <alias>knox-demo-ldap-buildx</alias>
+ <name>knox-demo-ldap:${project.version}</name>
+ <build>
+ <contextDir>${project.build.outputDirectory}/docker</contextDir>
+ <args>
+ <RELEASE_FILE>knox-${project.version}.zip</RELEASE_FILE>
+ <ENTRYPOINT>ldap-entrypoint.sh</ENTRYPOINT>
+ <EXPOSE_PORT>33389</EXPOSE_PORT>
+ </args>
+ <entryPoint>ldap-entrypoint.sh</entryPoint>
+ </build>
+ </image>
+ </images>
</configuration>
<executions>
<execution>
- <id>gateway</id>
- <phase>package</phase>
+ <id>default</id>
<goals>
<goal>build</goal>
- <goal>tag</goal>
</goals>
- <configuration>
- <repository>apache/knox-gateway</repository>
- <tag>${project.version}</tag>
- <buildArgs>
- <ENTRYPOINT>gateway-entrypoint.sh</ENTRYPOINT>
- <EXPOSE_PORT>8443</EXPOSE_PORT>
- </buildArgs>
- </configuration>
- </execution>
- <execution>
- <id>ldap</id>
<phase>package</phase>
- <goals>
- <goal>build</goal>
- <goal>tag</goal>
- </goals>
- <configuration>
- <repository>apache/knox-demo-ldap</repository>
- <tag>${project.version}</tag>
- <buildArgs>
- <ENTRYPOINT>ldap-entrypoint.sh</ENTRYPOINT>
- <EXPOSE_PORT>33389</EXPOSE_PORT>
- </buildArgs>
- </configuration>
</execution>
</executions>
</plugin>
@@ -137,4 +152,4 @@
</build>
</profile>
</profiles>
-</project>
+</project>
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 4bc5a1fa7..a8b331784 100644
--- a/pom.xml
+++ b/pom.xml
@@ -287,6 +287,8 @@
<xml-jaxb.version>2.3.0</xml-jaxb.version>
<xml-matchers.version>0.10</xml-matchers.version>
<zookeeper.version>3.8.1</zookeeper.version>
+ <docker-maven-plugin.version>0.43.4</docker-maven-plugin.version>
+ <docker.platforms>linux/amd64,linux/arm64</docker.platforms>
</properties>
<repositories>
<repository>
@@ -1601,7 +1603,7 @@
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-mapreduce-client-core</artifactId>
<version>${hadoop.version}</version>
- <scope>provided</scope>
+ <scope>provided</scope>
<exclusions>
<exclusion>
<groupId>jdk.tools</groupId>
@@ -2448,6 +2450,29 @@
</exclusion>
</exclusions>
</dependency>
+ <dependency>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <version>${docker-maven-plugin.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>com.google.cloud.tools</groupId>
+ <artifactId>jib-core</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.github.jnr</groupId>
+ <artifactId>jnr-unixsocket</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.yaml</groupId>
+ <artifactId>snakeyaml</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
<!-- ********** ********** ********** ********** ********** ********** -->
<!-- ********** Test Dependencies ********** -->