From bae875b94d40fd505f307522bd2eccd5a95cc238 Mon Sep 17 00:00:00 2001 From: Stephane de Labrusse Date: Mon, 26 Feb 2024 12:08:57 +0100 Subject: [PATCH] Update ldapproxy image and service configuration --- build-images.sh | 13 ++++++++++--- imageroot/systemd/user/ldapproxy.service | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/build-images.sh b/build-images.sh index aef815c..ba5ffad 100644 --- a/build-images.sh +++ b/build-images.sh @@ -4,19 +4,26 @@ set -e images=() repobase="${REPOBASE:-ghcr.io/nethserver}" -reponame="ldapproxy" +reponame="ldapproxy-binary" container=$(buildah from docker.io/library/nginx:1.25.3-alpine) buildah run "${container}" /bin/sh <<'EOF' set -e apk add --no-cache ca-certificates EOF +# Commit the image +buildah commit --rm "${container}" "${repobase}/${reponame}" +# Append the image URL to the images array +images+=("${repobase}/${reponame}") + +reponame="ldapproxy" +container=$(buildah from scratch) buildah add "${container}" imageroot /imageroot buildah add "${container}" ui /ui buildah config \ --label='org.nethserver.tcp-ports-demand=8' \ --label='org.nethserver.flags=core_module no_data_backup' \ - --label="org.nethserver.images=${repobase}/ldapproxy:${IMAGETAG:-latest}" \ - --entrypoint=/ "${container}" + --label="org.nethserver.images=${repobase}/ldapproxy-binary:${IMAGETAG:-latest}" \ + "${container}" buildah commit "${container}" "${repobase}/${reponame}" images+=("${repobase}/${reponame}") diff --git a/imageroot/systemd/user/ldapproxy.service b/imageroot/systemd/user/ldapproxy.service index 3e0cdae..87e0d6f 100644 --- a/imageroot/systemd/user/ldapproxy.service +++ b/imageroot/systemd/user/ldapproxy.service @@ -19,7 +19,7 @@ ExecStart=/usr/bin/podman run \ --network=host \ --replace --name=%N \ --volume=./nginx:/srv:z \ - ${LDAPPROXY_IMAGE} nginx -g "daemon off;" -c /srv/nginx.conf + ${LDAPPROXY_BINARY_IMAGE} nginx -g "daemon off;" -c /srv/nginx.conf ExecReload=-/usr/local/bin/runagent update-conf ExecReload=/usr/bin/podman exec %N nginx -s reload ExecStop=/usr/bin/podman stop --ignore --cidfile %t/ldapproxy.ctr-id -t 10