ARG NGINX_IMAGE=nginxinc/nginx-unprivileged:1.31.3-alpine@sha256:18d67281256ded39ff65e010ae4f831be18f19356f83c60bc546492c7eb6dd23 FROM ${NGINX_IMAGE} AS release ARG TOOLBOX_RELEASE_VERSION=0.3.1 ARG TOOLBOX_RELEASE_SHA256=41d0f99ffa1a88a6b9cfd5f6a6ca2823a96c0a53cec5ee2a42a688de30b12465 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