Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
201 changes: 175 additions & 26 deletions package/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -142,44 +142,193 @@
<build>
<plugins>
<plugin>
<groupId>org.eclipse.jkube</groupId>
<artifactId>kubernetes-maven-plugin</artifactId>
<version>${kubernetes-maven-plugin.version}</version>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.1.0</version>
<executions>

<execution>
<id>amd64</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>docker</executable>
<arguments>
<argument>build</argument>
<argument>--tag</argument>
<argument>arcadedata/arcadedb:latest-amd64</argument>
<argument>--tag</argument>
<argument>arcadedata/arcadedb:${project.version}-amd64</argument>
<argument>--platform</argument>
<argument>linux/amd64</argument>
<argument>--build-arg</argument>
<argument>TARGET=target/arcadedb-${project.version}.dir/arcadedb-${project.version}</argument>
<argument>-f</argument>
<argument>${project.basedir}/src/main/docker/Dockerfile</argument>
<argument>.</argument>
</arguments>
</configuration>
</execution>

<execution>
<id>default</id>
<id>arm64</id>
<phase>package</phase>
<goals>
<goal>build</goal>
<goal>exec</goal>
</goals>
<configuration>
<executable>docker</executable>
<arguments>
<argument>build</argument>
<argument>--tag</argument>
<argument>arcadedata/arcadedb:latest-arm64</argument>
<argument>--tag</argument>
<argument>arcadedata/arcadedb:${project.version}-arm64</argument>
<argument>--platform</argument>
<argument>linux/arm64</argument>
<argument>--build-arg</argument>
<argument>TARGET=target/arcadedb-${project.version}.dir/arcadedb-${project.version}</argument>
<argument>-f</argument>
<argument>${project.basedir}/src/main/docker/Dockerfile</argument>
<argument>.</argument>
</arguments>
</configuration>
</execution>

<execution>
<id>latest_push_amd</id>
<phase>deploy</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>docker</executable>
<arguments>
<argument>push</argument>
<argument>arcadedata/arcadedb:latest-amd64</argument>
</arguments>
</configuration>
</execution>

<execution>
<id>latest_push_arm</id>
<phase>deploy</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>docker</executable>
<arguments>
<argument>push</argument>
<argument>arcadedata/arcadedb:latest-arm64</argument>
</arguments>
</configuration>
</execution>

<execution>
<id>latest_amend</id>
<phase>deploy</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>docker</executable>
<arguments>
<argument>manifest</argument>
<argument>create</argument>
<argument>arcadedata/arcadedb:latest</argument>
<argument>--amend</argument>
<argument>arcadedata/arcadedb:latest-amd64</argument>
<argument>--amend</argument>
<argument>arcadedata/arcadedb:latest-arm64</argument>
</arguments>
</configuration>
</execution>

<execution>
<id>latest_push</id>
<phase>deploy</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>docker</executable>
<arguments>
<argument>manifest</argument>
<argument>push</argument>
<argument>arcadedata/arcadedb:latest</argument>
</arguments>
</configuration>
</execution>

<execution>
<id>version_push_amd</id>
<phase>deploy</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>docker</executable>
<arguments>
<argument>push</argument>
<argument>arcadedata/arcadedb:${project.version}-amd64</argument>
</arguments>
</configuration>
</execution>

<execution>
<id>version_push_arm</id>
<phase>deploy</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>docker</executable>
<arguments>
<argument>push</argument>
<argument>arcadedata/arcadedb:${project.version}-arm64</argument>
</arguments>
</configuration>
</execution>

<execution>
<id>deploy</id>
<id>version_amend</id>
<phase>deploy</phase>
<goals>
<goal>push</goal>
<goal>exec</goal>
</goals>
<configuration>
<executable>docker</executable>
<arguments>
<argument>manifest</argument>
<argument>create</argument>
<argument>arcadedata/arcadedb:${project.version}</argument>
<argument>--amend</argument>
<argument>arcadedata/arcadedb:${project.version}-amd64</argument>
<argument>--amend</argument>
<argument>arcadedata/arcadedb:${project.version}-arm64</argument>
</arguments>
</configuration>
</execution>

<execution>
<id>version_push</id>
<phase>deploy</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>docker</executable>
<arguments>
<argument>manifest</argument>
<argument>push</argument>
<argument>arcadedata/arcadedb:${project.version}</argument>
</arguments>
</configuration>
</execution>
</executions>
<configuration>
<verbose>true</verbose>
<images>
<image>
<name>arcadedata/arcadedb</name>
<build>
<dockerFile>${project.basedir}/src/main/docker/Dockerfile</dockerFile>
<contextDir>${project.build.directory}/arcadedb-${project.version}.dir</contextDir>
<args>
<docker.buildArg.ARCH>arm64v8/,amd64/,winamd64/,arm32v7/</docker.buildArg.ARCH>
</args>
<tags>
<tag>latest</tag>
<tag>${project.version}</tag>
</tags>
</build>
</image>
</images>
</configuration>
</plugin>
</plugins>
</build>
Expand Down
11 changes: 8 additions & 3 deletions package/src/main/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@
# limitations under the License.
#

ARG ARCH=
ARG ARCH

FROM ${ARCH}eclipse-temurin:11

ARG TARGET

LABEL maintainer="Arcade Data LTD (info@arcadedb.com)"

ENV JAVA_OPTS=" "
Expand All @@ -30,10 +32,13 @@ ENV ARCADEDB_JMX="-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxre

RUN useradd -ms /bin/bash arcadedb

COPY --chown=arcadedb:arcadedb ${TARGET} /home/arcadedb

RUN chmod +x /home/arcadedb/bin/*.sh

WORKDIR /home/arcadedb

COPY --chown=arcadedb:arcadedb ./maven/arcadedb-* ./
RUN chmod +x ./bin/*.sh
USER arcadedb

# Volumes available
VOLUME [ "/home/arcadedb/databases"]
Expand Down