Skip to content
Snippets Groups Projects
Select Git revision
  • 7dbea83a6b86387ed97223c489d7d572219e25b1
  • main default protected
  • renovate/main-renovatebot-osv-offline-1.x
  • fix/36927-maven-tags
  • renovate/main-redis-5.x
  • next
  • revert-31645-feat/rename-gradle-wrapper-validation-action
  • fix/36615b-branch-reuse-no-cache
  • chore/punycode
  • refactor/pin-new-value
  • feat/36219--git-x509-signing
  • feat/structured-logger
  • hotfix/39.264.1
  • feat/skip-dangling
  • gh-readonly-queue/next/pr-36034-7a061c4ca1024a19e2c295d773d9642625d1c2be
  • hotfix/39.238.3
  • refactor/gitlab-auto-approve
  • feat/template-strings
  • gh-readonly-queue/next/pr-35654-137d934242c784e0c45d4b957362214f0eade1d7
  • fix/32307-global-extends-merging
  • fix/32307-global-extends-repositories
  • 41.37.7
  • 41.37.6
  • 41.37.5
  • 41.37.4
  • 41.37.3
  • 41.37.2
  • 41.37.1
  • 41.37.0
  • 41.36.2
  • 41.36.1
  • 41.36.0
  • 41.35.2
  • 41.35.1
  • 41.35.0
  • 41.34.1
  • 41.34.0
  • 41.33.0
  • 41.32.3
  • 41.32.2
  • 41.32.1
41 results

python.md

Blame
  • Dockerfile-alpine.template 2.98 KiB
    FROM nginx:%%NGINX_VERSION%%-alpine-slim
    
    ENV NJS_VERSION   %%NJS_VERSION%%
    ENV NJS_RELEASE   %%NJS_RELEASE%%
    
    RUN set -x \
        && apkArch="$(cat /etc/apk/arch)" \
        && nginxPackages="%%PACKAGES%%
        " \
    # install prerequisites for public key and pkg-oss checks
        && apk add --no-cache --virtual .checksum-deps \
            openssl \
        && case "$apkArch" in \
            x86_64|aarch64) \
    # arches officially built by upstream
                apk add -X "%%PACKAGEREPO%%v$(egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release)/main" --no-cache $nginxPackages \
                ;; \
            *) \
    # we're on an architecture upstream doesn't officially build for
    # let's build binaries from the published packaging sources
                set -x \
                && tempDir="$(mktemp -d)" \
                && chown nobody:nobody $tempDir \
                && apk add --no-cache --virtual .build-deps \
                    gcc \
                    libc-dev \
                    make \
                    openssl-dev \
                    pcre2-dev \
                    zlib-dev \
                    linux-headers \
                    libxslt-dev \
                    gd-dev \
                    geoip-dev \
                    libedit-dev \
                    bash \
                    alpine-sdk \
                    findutils \
                    curl \
                && su nobody -s /bin/sh -c " \
                    export HOME=${tempDir} \
                    && cd ${tempDir} \
                    && curl -f -L -O https://github.com/nginx/pkg-oss/archive/%%REVISION%%.tar.gz \
                    && PKGOSSCHECKSUM=\"%%PKGOSSCHECKSUM%% *%%REVISION%%.tar.gz\" \
                    && if [ \"\$(openssl sha512 -r %%REVISION%%.tar.gz)\" = \"\$PKGOSSCHECKSUM\" ]; then \
                        echo \"pkg-oss tarball checksum verification succeeded!\"; \
                    else \
                        echo \"pkg-oss tarball checksum verification failed!\"; \
                        exit 1; \
                    fi \
                    && tar xzvf %%REVISION%%.tar.gz \
                    && cd pkg-oss-%%REVISION%% \
                    && cd alpine \
                    && make %%BUILDTARGET%% \
                    && apk index --allow-untrusted -o ${tempDir}/packages/alpine/${apkArch}/APKINDEX.tar.gz ${tempDir}/packages/alpine/${apkArch}/*.apk \
                    && abuild-sign -k ${tempDir}/.abuild/abuild-key.rsa ${tempDir}/packages/alpine/${apkArch}/APKINDEX.tar.gz \
                    " \
                && cp ${tempDir}/.abuild/abuild-key.rsa.pub /etc/apk/keys/ \
                && apk del --no-network .build-deps \
                && apk add -X ${tempDir}/packages/alpine/ --no-cache $nginxPackages \
                ;; \
        esac \
    # remove checksum deps
        && apk del --no-network .checksum-deps \
    # if we have leftovers from building, let's purge them (including extra, unnecessary build deps)
        && if [ -n "$tempDir" ]; then rm -rf "$tempDir"; fi \
        && if [ -f "/etc/apk/keys/abuild-key.rsa.pub" ]; then rm -f /etc/apk/keys/abuild-key.rsa.pub; fi \
    # Bring in curl and ca-certificates to make registering on DNS SD easier
        && apk add --no-cache curl ca-certificates