ARG NGINX_IMAGE=nginxinc/nginx-unprivileged:1.31.3-alpine@sha256:18d67281256ded39ff65e010ae4f831be18f19356f83c60bc546492c7eb6dd23 FROM ${NGINX_IMAGE} AS release ARG TOOLBOX_RELEASE_VERSION=0.20.1 ARG TOOLBOX_RELEASE_SHA256=19d5c7f78d5b781abae0fbe05095899c21ba24adb43f9b4a2272c95a2e0a933c ARG TOOLBOX_RELEASE_BASE_URL=https://git.add-ideas.de/lotobo/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; \ test -f /tmp/toolbox/apps/av/toolbox-app.json; \ test -f /tmp/toolbox/apps/regex/toolbox-app.json; \ test -f /tmp/toolbox/apps/svg/toolbox-app.json; \ test -f /tmp/toolbox/apps/auth/toolbox-app.json; \ test -f /tmp/toolbox/apps/sudoku/toolbox-app.json; \ test -f /tmp/toolbox/apps/colour/toolbox-app.json; \ test -f /tmp/toolbox/apps/office/toolbox-app.json; \ test -f /tmp/toolbox/apps/image/toolbox-app.json; \ test -f /tmp/toolbox/apps/file/toolbox-app.json; \ test -f /tmp/toolbox/apps/epub/toolbox-app.json; \ test -f /tmp/toolbox/apps/archive/toolbox-app.json; \ test -f /tmp/toolbox/apps/privacy/toolbox-app.json; \ test -f /tmp/toolbox/apps/crypto/toolbox-app.json; \ test -f /tmp/toolbox/apps/barcode/toolbox-app.json; \ test -f /tmp/toolbox/apps/network/toolbox-app.json; \ test -f /tmp/toolbox/apps/geo/toolbox-app.json; \ test -f /tmp/toolbox/apps/helper/toolbox-app.json; \ test -f /tmp/toolbox/apps/rand/toolbox-app.json; \ test -f /tmp/toolbox/apps/data/toolbox-app.json; \ test -f /tmp/toolbox/apps/diff/toolbox-app.json; \ test -f /tmp/toolbox/apps/time/toolbox-app.json; \ test -f /tmp/toolbox/apps/text/toolbox-app.json; \ test -f /tmp/toolbox/apps/unicode/toolbox-app.json; \ test -f /tmp/toolbox/apps/flow/toolbox-app.json; \ test -f /tmp/toolbox/apps/subtitle/toolbox-app.json; \ test -f /tmp/toolbox/apps/midi/toolbox-app.json; \ test -f /tmp/toolbox/apps/3d/toolbox-app.json; \ test -f /tmp/toolbox/apps/query/toolbox-app.json; \ test -f /tmp/toolbox/apps/scan/toolbox-app.json; \ test -f /tmp/toolbox/apps/package/toolbox-app.json; \ test -f /tmp/toolbox/apps/label/toolbox-app.json; \ test -f /tmp/toolbox/apps/font/toolbox-app.json; \ test -f /tmp/toolbox/apps/fixture/toolbox-app.json; \ test -f /tmp/toolbox/apps/minimize/toolbox-app.json; \ test -f /tmp/toolbox/apps/format-lab/toolbox-app.json; \ test -f /tmp/toolbox/apps/repro/toolbox-app.json; \ test -f /tmp/toolbox/apps/schema/toolbox-app.json; \ test -f /tmp/toolbox/apps/log/toolbox-app.json; \ test -f /tmp/toolbox/apps/binary/toolbox-app.json; \ test -f /tmp/toolbox/apps/git/toolbox-app.json; \ test -f /tmp/toolbox/apps/api/toolbox-app.json; \ test -f /tmp/toolbox/apps/mail/toolbox-app.json; \ test -f /tmp/toolbox/apps/calendar/toolbox-app.json; \ test -f /tmp/toolbox/apps/contact/toolbox-app.json; \ test -f /tmp/toolbox/apps/diagram/toolbox-app.json; \ test -f /tmp/toolbox/apps/token/toolbox-app.json; \ test -f /tmp/toolbox/apps/device/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