@@ -14,22 +14,23 @@ images=()
1414repobase=" ${REPOBASE:- ghcr.io/ geniusdynamics} "
1515# Configure the image name
1616reponame=" mautic"
17+ mautic_version=" 6-apache"
1718
1819# Create a new empty container image
1920container=$( buildah from scratch)
2021
2122# Reuse existing nodebuilder-mautic container, to speed up builds
2223if ! buildah containers --format " {{.ContainerName}}" | grep -q nodebuilder-mautic; then
23- echo " Pulling NodeJS runtime..."
24- buildah from --name nodebuilder-mautic -v " ${PWD} :/usr/src:Z" docker.io/library/node:lts
24+ echo " Pulling NodeJS runtime..."
25+ buildah from --name nodebuilder-mautic -v " ${PWD} :/usr/src:Z" docker.io/library/node:lts
2526fi
2627
2728echo " Build static UI files with node..."
2829buildah run \
29- --workingdir=/usr/src/ui \
30- --env=" NODE_OPTIONS=--openssl-legacy-provider" \
31- nodebuilder-mautic \
32- sh -c " yarn install && yarn build"
30+ --workingdir=/usr/src/ui \
31+ --env=" NODE_OPTIONS=--openssl-legacy-provider" \
32+ nodebuilder-mautic \
33+ sh -c " yarn install && yarn build"
3334
3435# Add imageroot directory to the container image
3536buildah add " ${container} " imageroot /imageroot
@@ -42,11 +43,11 @@ buildah add "${container}" ui/dist /ui
4243# rootfull=0 === rootless container
4344# tcp-ports-demand=1 number of tcp Port to reserve , 1 is the minimum, can be udp or tcp
4445buildah config --entrypoint=/ \
45- --label=" org.nethserver.authorizations=traefik@node:routeadm" \
46- --label=" org.nethserver.tcp-ports-demand=1" \
47- --label=" org.nethserver.rootfull=0" \
48- --label=" org.nethserver.images=docker.io/mariadb:10.11.5 docker.io/mautic/mautic:5.1-apache " \
49- " ${container} "
46+ --label=" org.nethserver.authorizations=traefik@node:routeadm" \
47+ --label=" org.nethserver.tcp-ports-demand=1" \
48+ --label=" org.nethserver.rootfull=0" \
49+ --label=" org.nethserver.images=docker.io/mariadb:10.11.5 docker.io/mautic/mautic:$mautic_version " \
50+ " ${container} "
5051# Commit the image
5152buildah commit " ${container} " " ${repobase} /${reponame} "
5253
@@ -64,14 +65,14 @@ images+=("${repobase}/${reponame}")
6465#
6566
6667#
67- # Setup CI when pushing to Github.
68+ # Setup CI when pushing to Github.
6869# Warning! docker::// protocol expects lowercase letters (,,)
6970if [[ -n " ${CI} " ]]; then
70- # Set output value for Github Actions
71- printf " images=%s\n" " ${images[*],,} " >> " ${GITHUB_OUTPUT} "
71+ # Set output value for Github Actions
72+ printf " images=%s\n" " ${images[*],,} " >> " ${GITHUB_OUTPUT} "
7273else
73- # Just print info for manual push
74- printf " Publish the images with:\n\n"
75- for image in " ${images[@],,} " ; do printf " buildah push %s docker://%s:%s\n" " ${image} " " ${image} " " ${IMAGETAG:- latest} " ; done
76- printf " \n"
74+ # Just print info for manual push
75+ printf " Publish the images with:\n\n"
76+ for image in " ${images[@],,} " ; do printf " buildah push %s docker://%s:%s\n" " ${image} " " ${image} " " ${IMAGETAG:- latest} " ; done
77+ printf " \n"
7778fi
0 commit comments