mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
This reverts commit 212fa9b362
.
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
ARG BASE_IMAGE
|
|
||||||
# BUILD STAGE AGS
|
# BUILD STAGE AGS
|
||||||
FROM debian:11-slim AS AGSBUILDER
|
FROM debian:11-slim AS AGSBUILDER
|
||||||
|
|
||||||
@@ -13,7 +12,7 @@ RUN unzip -q /build/gs-api-explorer-*.war -d /build/gs-api-explorer && \
|
|||||||
chmod -R g-w,o= /build
|
chmod -R g-w,o= /build
|
||||||
|
|
||||||
# ACTUAL IMAGE
|
# ACTUAL IMAGE
|
||||||
FROM ${BASE_IMAGE}
|
FROM alfresco/alfresco-community-repo-base:${image.tag}
|
||||||
|
|
||||||
# Alfresco user does not have permissions to modify webapps or configuration. Switch to root.
|
# Alfresco user does not have permissions to modify webapps or configuration. Switch to root.
|
||||||
# The access will be fixed after all operations are done.
|
# The access will be fixed after all operations are done.
|
||||||
|
@@ -15,8 +15,6 @@
|
|||||||
<app.amp.client.war.folder>${project.build.directory}/${project.build.finalName}-war</app.amp.client.war.folder>
|
<app.amp.client.war.folder>${project.build.directory}/${project.build.finalName}-war</app.amp.client.war.folder>
|
||||||
|
|
||||||
<image.name>alfresco/alfresco-governance-repository-community-base</image.name>
|
<image.name>alfresco/alfresco-governance-repository-community-base</image.name>
|
||||||
<base.image>alfresco/alfresco-community-repo-base</base.image>
|
|
||||||
<scripts.directory>${project.parent.parent.parent.parent.basedir}/scripts</scripts.directory>
|
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@@ -539,43 +537,9 @@
|
|||||||
</build>
|
</build>
|
||||||
</profile>
|
</profile>
|
||||||
|
|
||||||
<profile>
|
|
||||||
<id>build-docker-images</id>
|
|
||||||
<!-- builds "image:latest" locally -->
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>io.fabric8</groupId>
|
|
||||||
<artifactId>docker-maven-plugin</artifactId>
|
|
||||||
<configuration combine.self="override">
|
|
||||||
<images>
|
|
||||||
<image>
|
|
||||||
<name>${image.name}:${image.tag}</name>
|
|
||||||
<build>
|
|
||||||
<args>
|
|
||||||
<BASE_IMAGE>${base.image}:${image.tag}</BASE_IMAGE>
|
|
||||||
</args>
|
|
||||||
<contextDir>${project.basedir}</contextDir>
|
|
||||||
</build>
|
|
||||||
</image>
|
|
||||||
</images>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>build-image</id>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>build</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
|
|
||||||
<profile>
|
<profile>
|
||||||
<id>build-multiarch-docker-images</id>
|
<id>build-docker-images</id>
|
||||||
|
<!-- builds "image:latest" locally -->
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
@@ -584,51 +548,20 @@
|
|||||||
<configuration>
|
<configuration>
|
||||||
<images>
|
<images>
|
||||||
<image>
|
<image>
|
||||||
<name>${local.registry}/${image.name}:${image.tag}</name>
|
<name>${image.name}:${image.tag}</name>
|
||||||
<build>
|
|
||||||
<buildx>
|
|
||||||
<builderName>${builder.name}</builderName>
|
|
||||||
</buildx>
|
|
||||||
<args>
|
|
||||||
<BASE_IMAGE>${local.registry}/${base.image}:${image.tag}</BASE_IMAGE>
|
|
||||||
</args>
|
|
||||||
</build>
|
|
||||||
</image>
|
</image>
|
||||||
</images>
|
</images>
|
||||||
</configuration>
|
</configuration>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>build-push-image</id>
|
<id>build-image</id>
|
||||||
<phase>install</phase>
|
<phase>package</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>build</goal>
|
<goal>build</goal>
|
||||||
<goal>push</goal>
|
|
||||||
</goals>
|
</goals>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
|
||||||
<artifactId>exec-maven-plugin</artifactId>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>prepare-buildx</id>
|
|
||||||
<phase>generate-sources</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>exec</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<executable>${scripts.directory}/prepare_buildx.sh</executable>
|
|
||||||
<arguments>
|
|
||||||
<argument>${builder.name}</argument>
|
|
||||||
<argument>${image.registry}</argument>
|
|
||||||
<argument>${image.name}</argument>
|
|
||||||
<argument>${image.tag}</argument>
|
|
||||||
</arguments>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</profile>
|
</profile>
|
||||||
@@ -645,27 +578,12 @@
|
|||||||
<images>
|
<images>
|
||||||
<image>
|
<image>
|
||||||
<!-- Quay image -->
|
<!-- Quay image -->
|
||||||
<name>${image.registry}/${image.name}:${image.tag}</name>
|
<name>${image.name}:${image.tag}</name>
|
||||||
<build>
|
<registry>${image.registry}</registry>
|
||||||
<buildx>
|
|
||||||
<builderName>${builder.name}</builderName>
|
|
||||||
</buildx>
|
|
||||||
<args>
|
|
||||||
<BASE_IMAGE>${local.registry}/${base.image}:${image.tag}</BASE_IMAGE>
|
|
||||||
</args>
|
|
||||||
</build>
|
|
||||||
</image>
|
</image>
|
||||||
<image>
|
<image>
|
||||||
<!-- DockerHub image -->
|
<!-- DockerHub image -->
|
||||||
<name>${image.name}:${image.tag}</name>
|
<name>${image.name}:${image.tag}</name>
|
||||||
<build>
|
|
||||||
<buildx>
|
|
||||||
<builderName>${builder.name}</builderName>
|
|
||||||
</buildx>
|
|
||||||
<args>
|
|
||||||
<BASE_IMAGE>${local.registry}/${base.image}:${image.tag}</BASE_IMAGE>
|
|
||||||
</args>
|
|
||||||
</build>
|
|
||||||
</image>
|
</image>
|
||||||
</images>
|
</images>
|
||||||
</configuration>
|
</configuration>
|
||||||
@@ -680,28 +598,6 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
|
||||||
<artifactId>exec-maven-plugin</artifactId>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>prepare-buildx</id>
|
|
||||||
<phase>generate-sources</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>exec</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<executable>${scripts.directory}/prepare_buildx.sh</executable>
|
|
||||||
<arguments>
|
|
||||||
<argument>${builder.name}</argument>
|
|
||||||
<argument>${image.registry}</argument>
|
|
||||||
<argument>${image.name}</argument>
|
|
||||||
<argument>${image.tag}</argument>
|
|
||||||
</arguments>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</profile>
|
</profile>
|
||||||
|
@@ -12,7 +12,6 @@
|
|||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<image.name>alfresco/alfresco-community-repo-base</image.name>
|
<image.name>alfresco/alfresco-community-repo-base</image.name>
|
||||||
<scripts.directory>${project.parent.parent.basedir}/scripts</scripts.directory>
|
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
@@ -136,7 +135,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>io.fabric8</groupId>
|
<groupId>io.fabric8</groupId>
|
||||||
<artifactId>docker-maven-plugin</artifactId>
|
<artifactId>docker-maven-plugin</artifactId>
|
||||||
<configuration combine.self="override">
|
<configuration>
|
||||||
<images>
|
<images>
|
||||||
<image>
|
<image>
|
||||||
<name>${image.name}:${image.tag}</name>
|
<name>${image.name}:${image.tag}</name>
|
||||||
@@ -157,62 +156,6 @@
|
|||||||
</build>
|
</build>
|
||||||
</profile>
|
</profile>
|
||||||
|
|
||||||
<profile>
|
|
||||||
<id>build-multiarch-docker-images</id>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>io.fabric8</groupId>
|
|
||||||
<artifactId>docker-maven-plugin</artifactId>
|
|
||||||
<configuration>
|
|
||||||
<images>
|
|
||||||
<image>
|
|
||||||
<name>${local.registry}/${image.name}:${image.tag}</name>
|
|
||||||
<build>
|
|
||||||
<buildx>
|
|
||||||
<builderName>${builder.name}</builderName>
|
|
||||||
</buildx>
|
|
||||||
</build>
|
|
||||||
</image>
|
|
||||||
</images>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>build-push-image</id>
|
|
||||||
<phase>install</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>build</goal>
|
|
||||||
<goal>push</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>exec-maven-plugin</artifactId>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>prepare-buildx</id>
|
|
||||||
<phase>generate-sources</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>exec</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<executable>${scripts.directory}/prepare_buildx.sh</executable>
|
|
||||||
<arguments>
|
|
||||||
<argument>${builder.name}</argument>
|
|
||||||
<argument>${image.registry}</argument>
|
|
||||||
<argument>${image.name}</argument>
|
|
||||||
<argument>${image.tag}</argument>
|
|
||||||
</arguments>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
|
|
||||||
<profile>
|
<profile>
|
||||||
<id>push-docker-images</id>
|
<id>push-docker-images</id>
|
||||||
<!-- publishes "image:latest" on Quay & DockerHub -->
|
<!-- publishes "image:latest" on Quay & DockerHub -->
|
||||||
@@ -225,7 +168,8 @@
|
|||||||
<images>
|
<images>
|
||||||
<!-- Quay image -->
|
<!-- Quay image -->
|
||||||
<image>
|
<image>
|
||||||
<name>${image.registry}/${image.name}:${image.tag}</name>
|
<name>${image.name}:${image.tag}</name>
|
||||||
|
<registry>${image.registry}</registry>
|
||||||
</image>
|
</image>
|
||||||
<!-- DockerHub image -->
|
<!-- DockerHub image -->
|
||||||
<image>
|
<image>
|
||||||
|
17
pom.xml
17
pom.xml
@@ -35,8 +35,6 @@
|
|||||||
<build-number>local</build-number>
|
<build-number>local</build-number>
|
||||||
<image.tag>latest</image.tag>
|
<image.tag>latest</image.tag>
|
||||||
<image.registry>quay.io</image.registry>
|
<image.registry>quay.io</image.registry>
|
||||||
<builder.name>entitled-builder</builder.name>
|
|
||||||
<local.registry>127.0.0.1:5000</local.registry>
|
|
||||||
|
|
||||||
<java.version>11</java.version>
|
<java.version>11</java.version>
|
||||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||||
@@ -919,21 +917,6 @@
|
|||||||
<groupId>io.fabric8</groupId>
|
<groupId>io.fabric8</groupId>
|
||||||
<artifactId>docker-maven-plugin</artifactId>
|
<artifactId>docker-maven-plugin</artifactId>
|
||||||
<version>0.42.0</version>
|
<version>0.42.0</version>
|
||||||
<configuration>
|
|
||||||
<images>
|
|
||||||
<image>
|
|
||||||
<build>
|
|
||||||
<buildx>
|
|
||||||
<platforms>
|
|
||||||
<platform>linux/amd64</platform>
|
|
||||||
<platform>linux/arm64</platform>
|
|
||||||
</platforms>
|
|
||||||
</buildx>
|
|
||||||
<contextDir>${project.basedir}</contextDir>
|
|
||||||
</build>
|
|
||||||
</image>
|
|
||||||
</images>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
@@ -1,21 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
BUILDER_NAME="${1}"
|
|
||||||
TARGET_REGISTRY="${2}"
|
|
||||||
TARGET_IMAGE="${3}"
|
|
||||||
IMAGE_TAG="${4}"
|
|
||||||
|
|
||||||
#Create a `docker-container` builder with host networking and required flags (quay.io)
|
|
||||||
docker --config target/docker/"${TARGET_REGISTRY}"/"${TARGET_IMAGE}"/"${IMAGE_TAG}"/docker \
|
|
||||||
buildx create --use --name "${BUILDER_NAME}" --driver-opt network=host \
|
|
||||||
--buildkitd-flags '--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host'
|
|
||||||
|
|
||||||
#Create a `docker-container` builder with host networking and required flags (docker.io)
|
|
||||||
docker --config target/docker/"${TARGET_IMAGE}"/"${IMAGE_TAG}"/docker \
|
|
||||||
buildx create --use --name "${BUILDER_NAME}" --driver-opt network=host \
|
|
||||||
--buildkitd-flags '--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host'
|
|
||||||
|
|
||||||
#Create a `docker-container` builder with host networking and required flags (local registry)
|
|
||||||
docker --config target/docker/127.0.0.1/5000/"${TARGET_IMAGE}"/"${IMAGE_TAG}"/docker \
|
|
||||||
buildx create --use --name "${BUILDER_NAME}" --driver-opt network=host \
|
|
||||||
--buildkitd-flags '--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host'
|
|
Reference in New Issue
Block a user