3 source "$(dirname "$0")/buildah-metadata"
4 container
=$
(buildah from argeo2-java
:openjdk-v
$VERSION_JAVA)
6 source "$(dirname "$0")/buildah-common"
8 buildah config
--label release
="1" $container
9 buildah config
--label version
="$VERSION" $container
12 buildah config
--label name
="argeo2-builder" $container
13 buildah config
--label description
="Argeo 2 Builder" $container
16 #buildah run $container -- microdnf -y install git
18 #buildah run $container -- microdnf -y install java-11-openjdk-devel
20 #buildah run $container -- microdnf -y install maven
21 #buildah copy $container maven.conf /etc/java/maven.conf
23 buildah run
$container -- microdnf
-y install tar gzip
24 buildah copy
$container https
://archive.apache.org
/dist
/maven
/maven-
3/$VERSION_MAVEN/binaries
/apache-maven-
$VERSION_MAVEN-bin.
tar.gz
/opt
25 buildah run
$container -- tar -C /opt
-xzf /opt
/apache-maven-
$VERSION_MAVEN-bin.
tar.gz
26 buildah run
$container -- rm -f /opt
/apache-maven-
$VERSION_MAVEN-bin.
tar.gz
27 buildah run
$container -- microdnf
-y remove
tar gzip
29 buildah run
$container -- ln -s /opt
/apache-maven-
$VERSION_MAVEN/bin
/mvn
/usr
/local
/bin
/mvn
30 # Maven script requires which
31 buildah run
$container -- microdnf
-y install which
33 buildah run
$container -- mkdir
-p /srv
/javafactory
/
36 buildah run
$container -- mkdir
-p /root
/build
/
37 buildah config
--workingdir /root
/build
/ $container
39 # Perform a build of argeo-commons
40 buildah copy
$container ..
/..
/root
/build
41 buildah run
$container -- mvn clean
install
42 #buildah run $container -- mvn dependency:go-offline
44 # Clean up build directories
45 buildah run
$container -- rm -rf /root
/.m
2/repository
/org
/argeo
/commons
46 buildah run
$container -- rm -rf /root
/build
47 buildah run
$container -- mkdir
-p /root
/build
/
50 buildah config
--entrypoint '["mvn","clean","install"]' $container
52 buildah commit
--rm --format docker
$container argeo2-builder
:maven-v
$VERSION_MAVEN
53 buildah push argeo2-builder
:maven-v
$VERSION_MAVEN docker
://argeo
/argeo2-builder
:maven-v
$VERSION_MAVEN
54 buildah push argeo2-builder
:maven-v
$VERSION_MAVEN docker
://argeo
/argeo2-builder
:latest