ARG NGINX_IMAGE=nginxinc/nginx-unprivileged:1.31.3-alpine@sha256:18d67281256ded39ff65e010ae4f831be18f19356f83c60bc546492c7eb6dd23 FROM ${NGINX_IMAGE} AS release ARG TOOLBOX_RELEASE_VERSION=0.4.0 ARG TOOLBOX_RELEASE_SHA256=0264f5ee2c545c10c50b96a5b6d55c3576b39bb29c546e1e4f1459fec4e8e112 ARG TOOLBOX_RELEASE_BASE_URL=https://git.add-ideas.de/zemion/toolbox-portal/releases/download RUN set -eu; \ archive="add-ideas-toolbox-${TOOLBOX_RELEASE_VERSION}.zip"; \ curl --fail --location --silent --show-error --proto '=https' \ --proto-redir '=https' --tlsv1.2 \ --output "/tmp/${archive}" \ "${TOOLBOX_RELEASE_BASE_URL}/v${TOOLBOX_RELEASE_VERSION}/${archive}"; \ echo "${TOOLBOX_RELEASE_SHA256} /tmp/${archive}" | sha256sum -c -; \ mkdir -p /tmp/toolbox; \ unzip -q "/tmp/${archive}" -d /tmp/toolbox; \ test -f /tmp/toolbox/index.html; \ test -f /tmp/toolbox/toolbox.catalog.json; \ test -f /tmp/toolbox/toolbox.release.json; \ test -f /tmp/toolbox/apps/pdf/toolbox-app.json; \ test -f /tmp/toolbox/apps/xslt/toolbox-app.json; \ test -f /tmp/toolbox/apps/onenote/toolbox-app.json; \ rm "/tmp/${archive}" FROM ${NGINX_IMAGE} COPY --chown=101:101 deploy/nginx.conf /etc/nginx/conf.d/default.conf COPY --from=release --chown=101:101 /tmp/toolbox/ /usr/share/nginx/html/ USER 101:101 EXPOSE 8080 HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ CMD wget --quiet --spider http://127.0.0.1:8080/toolbox.catalog.json || exit 1