@@ -14,22 +14,22 @@ images=()
1414repobase=" ${REPOBASE:- ghcr.io/ geniusdynamics} "
1515# Configure the image name
1616reponame=" listmonk"
17-
17+ listmonk_version= " v5.0.3 "
1818# Create a new empty container image
1919container=$( buildah from scratch)
2020
2121# Reuse existing nodebuilder-listmonk container, to speed up builds
2222if ! buildah containers --format " {{.ContainerName}}" | grep -q nodebuilder-listmonk; then
23- echo " Pulling NodeJS runtime..."
24- buildah from --name nodebuilder-listmonk -v " ${PWD} :/usr/src:Z" docker.io/library/node:lts
23+ echo " Pulling NodeJS runtime..."
24+ buildah from --name nodebuilder-listmonk -v " ${PWD} :/usr/src:Z" docker.io/library/node:lts
2525fi
2626
2727echo " Build static UI files with node..."
2828buildah run \
29- --workingdir=/usr/src/ui \
30- --env=" NODE_OPTIONS=--openssl-legacy-provider" \
31- nodebuilder-listmonk \
32- sh -c " yarn install && yarn build"
29+ --workingdir=/usr/src/ui \
30+ --env=" NODE_OPTIONS=--openssl-legacy-provider" \
31+ nodebuilder-listmonk \
32+ sh -c " yarn install && yarn build"
3333
3434# Add imageroot directory to the container image
3535buildah add " ${container} " imageroot /imageroot
@@ -42,11 +42,11 @@ buildah add "${container}" ui/dist /ui
4242# rootfull=0 === rootless container
4343# tcp-ports-demand=1 number of tcp Port to reserve , 1 is the minimum, can be udp or tcp
4444buildah 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/postgres:15.5-alpine3.19 docker.io/listmonk/listmonk:latest " \
49- " ${container} "
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/postgres:15.5-alpine3.19 docker.io/listmonk/listmonk:$listmonk_version " \
49+ " ${container} "
5050# Commit the image
5151buildah commit " ${container} " " ${repobase} /${reponame} "
5252
@@ -64,14 +64,14 @@ images+=("${repobase}/${reponame}")
6464#
6565
6666#
67- # Setup CI when pushing to Github.
67+ # Setup CI when pushing to Github.
6868# Warning! docker::// protocol expects lowercase letters (,,)
6969if [[ -n " ${CI} " ]]; then
70- # Set output value for Github Actions
71- printf " images=%s\n" " ${images[*],,} " >> " ${GITHUB_OUTPUT} "
70+ # Set output value for Github Actions
71+ printf " images=%s\n" " ${images[*],,} " >> " ${GITHUB_OUTPUT} "
7272else
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"
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"
7777fi
0 commit comments