Compare commits

...

2 Commits

Author SHA1 Message Date
a25e847062 Bump unit to 1.34.1 and move to matrix
All checks were successful
Build Docker Image / Build ARM64 (3.10) (push) Successful in 17m24s
Build Docker Image / Build ARM64 (3.11) (push) Successful in 17m2s
Build Docker Image / Build AMD64 (3.10) (push) Successful in 44m27s
Build Docker Image / Build ARM64 (3.12) (push) Successful in 17m2s
Build Docker Image / Build ARM64 (3.13) (push) Successful in 17m8s
Build Docker Image / Build AMD64 (3.11) (push) Successful in 43m36s
Build Docker Image / Build AMD64 (3.12) (push) Successful in 43m12s
Build Docker Image / Build AMD64 (3.13) (push) Successful in 43m5s
Build Docker Image / Create Multi-arch Manifest (3.10) (push) Successful in 13s
Build Docker Image / Create Multi-arch Manifest (3.11) (push) Successful in 11s
Build Docker Image / Create Multi-arch Manifest (3.12) (push) Successful in 11s
Build Docker Image / Create Multi-arch Manifest (3.13) (push) Successful in 12s
2025-01-25 09:59:16 +02:00
abf1f42fef Reapply "Bump unit to 1.34"
This reverts commit 1c6c0ba2b9.
2025-01-25 09:56:35 +02:00
5 changed files with 156 additions and 355 deletions

View File

@@ -5,17 +5,22 @@ on:
- main - main
schedule: schedule:
- cron: '@monthly' - cron: '@monthly'
jobs: jobs:
build-3-10-amd64: build-amd64:
runs-on: linux_amd runs-on: linux_amd
name: Build Python 3.10 AMD64 name: Build AMD64
container: container:
image: catthehacker/ubuntu:act-latest image: catthehacker/ubuntu:act-latest
env: env:
RUNNER_TOOL_CACHE: /toolcache RUNNER_TOOL_CACHE: /toolcache
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13']
outputs: outputs:
digest: ${{ steps.build-docker.outputs.digest }} digest-3-10: ${{ steps.digest.outputs.DIGEST_3_10 }}
digest-3-11: ${{ steps.digest.outputs.DIGEST_3_11 }}
digest-3-12: ${{ steps.digest.outputs.DIGEST_3_12 }}
digest-3-13: ${{ steps.digest.outputs.DIGEST_3_13 }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
@@ -40,21 +45,33 @@ jobs:
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5
with: with:
context: . context: .
file: Dockerfile.python3.10 file: Dockerfile.python${{ matrix.python-version }}
platforms: linux/amd64 platforms: linux/amd64
push: true push: true
provenance: false provenance: false
outputs: type=image,name=gitea.technocloud.ee/${{ steps.meta.outputs.REPO_NAME }},push-by-digest=true outputs: type=image,name=gitea.technocloud.ee/${{ steps.meta.outputs.REPO_NAME }},push-by-digest=true
- name: Summarize the Docker digest
id: digest
run: |
PY_VERSION=${{ matrix.python-version }}
PY_VERSION_MOD=$(echo $PY_VERSION | sed 's/\./_/g')
echo DIGEST_${PY_VERSION_MOD}="${{ steps.build-docker.outputs.digest }}" >> $GITHUB_OUTPUT
build-3-10-arm64: build-arm64:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: Build Python 3.10 ARM64 name: Build ARM64
container: container:
image: catthehacker/ubuntu:act-latest image: catthehacker/ubuntu:act-latest
env: env:
RUNNER_TOOL_CACHE: /toolcache RUNNER_TOOL_CACHE: /toolcache
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13']
outputs: outputs:
digest: ${{ steps.build-docker.outputs.digest }} digest-3-10: ${{ steps.digest.outputs.DIGEST_3_10 }}
digest-3-11: ${{ steps.digest.outputs.DIGEST_3_11 }}
digest-3-12: ${{ steps.digest.outputs.DIGEST_3_12 }}
digest-3-13: ${{ steps.digest.outputs.DIGEST_3_13 }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
@@ -79,16 +96,27 @@ jobs:
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
with: with:
context: . context: .
file: Dockerfile.python3.10 file: Dockerfile.python${{ matrix.python-version }}
platforms: linux/arm64 platforms: linux/arm64
push: true push: true
provenance: false provenance: false
outputs: type=image,name=gitea.technocloud.ee/${{ steps.meta.outputs.REPO_NAME }},push-by-digest=true outputs: type=image,name=gitea.technocloud.ee/${{ steps.meta.outputs.REPO_NAME }},push-by-digest=true
- name: Summarize the Docker digest
id: digest
run: |
PY_VERSION=${{ matrix.python-version }}
PY_VERSION_MOD=$(echo $PY_VERSION | sed 's/\./_/g')
echo DIGEST_${PY_VERSION_MOD}="${{ steps.build-docker.outputs.digest }}"
echo DIGEST_${PY_VERSION_MOD}="${{ steps.build-docker.outputs.digest }}" >> $GITHUB_OUTPUT
create-manifest-3-10: create-manifest:
needs: [build-3-10-arm64, build-3-10-amd64] needs: [build-arm64, build-amd64]
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: Create Python 3.10 Manifest name: Create Multi-arch Manifest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13']
steps: steps:
- name: Login to Docker Registry - name: Login to Docker Registry
uses: docker/login-action@v3 uses: docker/login-action@v3
@@ -96,333 +124,22 @@ jobs:
registry: gitea.technocloud.ee registry: gitea.technocloud.ee
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set up Docker BuildX - name: Set up Docker BuildX
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
with: with:
driver: docker-container driver: docker-container
- name: Get Repository Metadata - name: Get Repository Metadata
id: meta id: meta
run: | run: |
echo "PACKAGE=gitea.technocloud.ee/${GITHUB_REPOSITORY}" >> $GITHUB_OUTPUT echo "PACKAGE=gitea.technocloud.ee/${GITHUB_REPOSITORY}" >> $GITHUB_OUTPUT
echo "PY_VERSION=digest-$(echo ${{ matrix.python-version }} | sed 's/\./-/g')" >> $GITHUB_OUTPUT
- name: Create and Push Multi-arch Manifest - name: Create and Push Multi-arch Manifest
run: | run: |
IMAGE_NAME=${{ steps.meta.outputs.PACKAGE }}:python3.10 ARM_DIGEST=${{ needs.build-arm64.outputs[steps.meta.outputs.PY_VERSION] }}
docker manifest create $IMAGE_NAME \ AMD_DIGEST=${{ needs.build-amd64.outputs[steps.meta.outputs.PY_VERSION] }}
--amend ${{ steps.meta.outputs.PACKAGE }}@${{ needs.build-3-10-arm64.outputs.digest }} \ IMAGE_NAME=${{ steps.meta.outputs.PACKAGE }}:python${{ matrix.python-version }}
--amend ${{ steps.meta.outputs.PACKAGE }}@${{ needs.build-3-10-amd64.outputs.digest }} docker manifest create $IMAGE_NAME --amend ${{ steps.meta.outputs.PACKAGE }}@${ARM_DIGEST} --amend ${{ steps.meta.outputs.PACKAGE }}@${AMD_DIGEST}
docker manifest push $IMAGE_NAME docker manifest push $IMAGE_NAME
build-3-11-amd64:
runs-on: linux_amd
name: Build Python 3.11 AMD64
container:
image: catthehacker/ubuntu:act-latest
env:
RUNNER_TOOL_CACHE: /toolcache
outputs:
digest: ${{ steps.build-docker.outputs.digest }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
github-server-url: https://gitea.technocloud.ee
- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v3
with:
platforms: linux/amd64
- name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: gitea.technocloud.ee
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Get Meta
id: meta
run: |
echo "REPO_NAME=${GITHUB_REPOSITORY}" >> $GITHUB_OUTPUT
- name: Build and Push AMD64
id: build-docker
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.python3.11
platforms: linux/amd64
push: true
provenance: false
outputs: type=image,name=gitea.technocloud.ee/${{ steps.meta.outputs.REPO_NAME }},push-by-digest=true
build-3-11-arm64:
runs-on: ubuntu-latest
name: Build Python 3.11 ARM64
container:
image: catthehacker/ubuntu:act-latest
env:
RUNNER_TOOL_CACHE: /toolcache
outputs:
digest: ${{ steps.build-docker.outputs.digest }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
github-server-url: https://gitea.technocloud.ee
- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v3
with:
platforms: linux/arm64
- name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: gitea.technocloud.ee
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Get Meta
id: meta
run: |
echo "REPO_NAME=${GITHUB_REPOSITORY}" >> $GITHUB_OUTPUT
- name: Build and Push ARM64
id: build-docker
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile.python3.11
platforms: linux/arm64
push: true
provenance: false
outputs: type=image,name=gitea.technocloud.ee/${{ steps.meta.outputs.REPO_NAME }},push-by-digest=true
create-manifest-3-11:
needs: [build-3-11-arm64, build-3-11-amd64]
runs-on: ubuntu-latest
name: Create Python 3.11 Manifest
steps:
- name: Login to Docker Registry
uses: docker/login-action@v3
with:
registry: gitea.technocloud.ee
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v3
with:
driver: docker-container
- name: Get Repository Metadata
id: meta
run: |
echo "PACKAGE=gitea.technocloud.ee/${GITHUB_REPOSITORY}" >> $GITHUB_OUTPUT
- name: Create and Push Multi-arch Manifest
run: |
IMAGE_NAME=${{ steps.meta.outputs.PACKAGE }}:python3.11
docker manifest create $IMAGE_NAME \
--amend ${{ steps.meta.outputs.PACKAGE }}@${{ needs.build-3-11-arm64.outputs.digest }} \
--amend ${{ steps.meta.outputs.PACKAGE }}@${{ needs.build-3-11-amd64.outputs.digest }}
docker manifest push $IMAGE_NAME
build-3-12-amd64:
runs-on: linux_amd
name: Build Python 3.12 AMD64
container:
image: catthehacker/ubuntu:act-latest
env:
RUNNER_TOOL_CACHE: /toolcache
outputs:
digest: ${{ steps.build-docker.outputs.digest }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
github-server-url: https://gitea.technocloud.ee
- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v3
with:
platforms: linux/amd64
- name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: gitea.technocloud.ee
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Get Meta
id: meta
run: |
echo "REPO_NAME=${GITHUB_REPOSITORY}" >> $GITHUB_OUTPUT
- name: Build and Push AMD64
id: build-docker
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.python3.12
platforms: linux/amd64
push: true
provenance: false
outputs: type=image,name=gitea.technocloud.ee/${{ steps.meta.outputs.REPO_NAME }},push-by-digest=true
build-3-12-arm64:
runs-on: ubuntu-latest
name: Build Python 3.12 ARM64
container:
image: catthehacker/ubuntu:act-latest
env:
RUNNER_TOOL_CACHE: /toolcache
outputs:
digest: ${{ steps.build-docker.outputs.digest }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
github-server-url: https://gitea.technocloud.ee
- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v3
with:
platforms: linux/arm64
- name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: gitea.technocloud.ee
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Get Meta
id: meta
run: |
echo "REPO_NAME=${GITHUB_REPOSITORY}" >> $GITHUB_OUTPUT
- name: Build and Push ARM64
id: build-docker
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile.python3.12
platforms: linux/arm64
push: true
provenance: false
outputs: type=image,name=gitea.technocloud.ee/${{ steps.meta.outputs.REPO_NAME }},push-by-digest=true
create-manifest-3-12:
needs: [build-3-12-arm64, build-3-12-amd64]
runs-on: ubuntu-latest
name: Create Python 3.12 Manifest
steps:
- name: Login to Docker Registry
uses: docker/login-action@v3
with:
registry: gitea.technocloud.ee
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v3
with:
driver: docker-container
- name: Get Repository Metadata
id: meta
run: |
echo "PACKAGE=gitea.technocloud.ee/${GITHUB_REPOSITORY}" >> $GITHUB_OUTPUT
- name: Create and Push Multi-arch Manifest
run: |
IMAGE_NAME=${{ steps.meta.outputs.PACKAGE }}:python3.12
docker manifest create $IMAGE_NAME \
--amend ${{ steps.meta.outputs.PACKAGE }}@${{ needs.build-3-12-arm64.outputs.digest }} \
--amend ${{ steps.meta.outputs.PACKAGE }}@${{ needs.build-3-12-amd64.outputs.digest }}
docker manifest push $IMAGE_NAME
build-3-13-amd64:
runs-on: linux_amd
name: Build Python 3.13 AMD64
container:
image: catthehacker/ubuntu:act-latest
env:
RUNNER_TOOL_CACHE: /toolcache
outputs:
digest: ${{ steps.build-docker.outputs.digest }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
github-server-url: https://gitea.technocloud.ee
- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v3
with:
platforms: linux/amd64
- name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: gitea.technocloud.ee
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Get Meta
id: meta
run: |
echo "REPO_NAME=${GITHUB_REPOSITORY}" >> $GITHUB_OUTPUT
- name: Build and Push AMD64
id: build-docker
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.python3.13
platforms: linux/amd64
push: true
provenance: false
outputs: type=image,name=gitea.technocloud.ee/${{ steps.meta.outputs.REPO_NAME }},push-by-digest=true
build-3-13-arm64:
runs-on: ubuntu-latest
name: Build Python 3.13 ARM64
container:
image: catthehacker/ubuntu:act-latest
env:
RUNNER_TOOL_CACHE: /toolcache
outputs:
digest: ${{ steps.build-docker.outputs.digest }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
github-server-url: https://gitea.technocloud.ee
- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v3
with:
platforms: linux/arm64
- name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: gitea.technocloud.ee
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Get Meta
id: meta
run: |
echo "REPO_NAME=${GITHUB_REPOSITORY}" >> $GITHUB_OUTPUT
- name: Build and Push ARM64
id: build-docker
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile.python3.13
platforms: linux/arm64
push: true
provenance: false
outputs: type=image,name=gitea.technocloud.ee/${{ steps.meta.outputs.REPO_NAME }},push-by-digest=true
create-manifest-3-13:
needs: [build-3-13-arm64, build-3-13-amd64]
runs-on: ubuntu-latest
name: Create Python 3.13 Manifest
steps:
- name: Login to Docker Registry
uses: docker/login-action@v3
with:
registry: gitea.technocloud.ee
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v3
with:
driver: docker-container
- name: Get Repository Metadata
id: meta
run: |
echo "PACKAGE=gitea.technocloud.ee/${GITHUB_REPOSITORY}" >> $GITHUB_OUTPUT
- name: Create and Push Multi-arch Manifest
run: |
IMAGE_NAME=${{ steps.meta.outputs.PACKAGE }}:python3.13
docker manifest create $IMAGE_NAME \
--amend ${{ steps.meta.outputs.PACKAGE }}@${{ needs.build-3-13-arm64.outputs.digest }} \
--amend ${{ steps.meta.outputs.PACKAGE }}@${{ needs.build-3-13-amd64.outputs.digest }}
docker manifest push $IMAGE_NAME

View File

@@ -1,21 +1,41 @@
FROM python:3.10-slim FROM python:3.10-slim
LABEL org.opencontainers.image.title="Unit (python3.10)" LABEL org.opencontainers.image.title="Unit (python3.10-slim)"
LABEL org.opencontainers.image.description="Official build of Unit for Docker." LABEL org.opencontainers.image.description="Official build of Unit for Docker."
LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.url="https://unit.nginx.org"
LABEL org.opencontainers.image.source="https://github.com/nginx/unit" LABEL org.opencontainers.image.source="https://github.com/nginx/unit"
LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images" LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images"
LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers <docker-maint@nginx.com>" LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers <docker-maint@nginx.com>"
LABEL org.opencontainers.image.version="1.33.0" LABEL org.opencontainers.image.version="1.34.1"
RUN set -ex \ RUN set -ex \
&& savedAptMark="$(apt-mark showmanual)" \ && savedAptMark="$(apt-mark showmanual)" \
&& apt-get update \ && apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y ca-certificates git build-essential libssl-dev libpcre2-dev curl pkg-config \ && apt-get install --no-install-recommends --no-install-suggests -y \
ca-certificates git build-essential libssl-dev libpcre2-dev curl pkg-config libclang-dev cmake \
&& export RUST_VERSION=1.83.0 \
&& export RUSTUP_HOME=/usr/src/unit/rustup \
&& export CARGO_HOME=/usr/src/unit/cargo \
&& export PATH=/usr/src/unit/cargo/bin:$PATH \
&& dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
amd64) rustArch="x86_64-unknown-linux-gnu"; rustupSha256="6aeece6993e902708983b209d04c0d1dbb14ebb405ddb87def578d41f920f56d" ;; \
arm64) rustArch="aarch64-unknown-linux-gnu"; rustupSha256="1cffbf51e63e634c746f741de50649bbbcbd9dbe1de363c9ecef64e278dba2b2" ;; \
*) echo >&2 "unsupported architecture: ${dpkgArch}"; exit 1 ;; \
esac \
&& url="https://static.rust-lang.org/rustup/archive/1.27.1/${rustArch}/rustup-init" \
&& curl -L -O "$url" \
&& echo "${rustupSha256} *rustup-init" | sha256sum -c - \
&& chmod +x rustup-init \
&& ./rustup-init -y --no-modify-path --profile minimal --default-toolchain $RUST_VERSION --default-host ${rustArch} \
&& rm rustup-init \
&& rustup --version \
&& cargo --version \
&& rustc --version \
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
&& mkdir -p /usr/src/unit \ && mkdir -p /usr/src/unit \
&& cd /usr/src/unit \ && cd /usr/src/unit \
&& git clone --depth 1 -b 1.33.0-1 https://github.com/nginx/unit \ && git clone --depth 1 -b 1.34.1-1 https://github.com/nginx/unit \
&& cd unit \ && cd unit \
&& NCPU="$(getconf _NPROCESSORS_ONLN)" \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \
&& DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ && DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \
@@ -34,7 +54,8 @@ RUN set -ex \
--openssl \ --openssl \
--libdir=/usr/lib/$DEB_HOST_MULTIARCH" \ --libdir=/usr/lib/$DEB_HOST_MULTIARCH" \
&& CONFIGURE_ARGS="$CONFIGURE_ARGS_MODULES \ && CONFIGURE_ARGS="$CONFIGURE_ARGS_MODULES \
--njs" \ --njs \
--otel" \
&& make -j $NCPU -C pkg/contrib .njs \ && make -j $NCPU -C pkg/contrib .njs \
&& export PKG_CONFIG_PATH=$(pwd)/pkg/contrib/njs/build \ && export PKG_CONFIG_PATH=$(pwd)/pkg/contrib/njs/build \
&& ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modulesdir=/usr/lib/unit/debug-modules --debug \ && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modulesdir=/usr/lib/unit/debug-modules --debug \
@@ -86,4 +107,4 @@ STOPSIGNAL SIGTERM
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
EXPOSE 80 EXPOSE 80
CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"] CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"]

View File

@@ -1,21 +1,41 @@
FROM python:3.11-slim FROM python:3.11-slim
LABEL org.opencontainers.image.title="Unit (python3.11)" LABEL org.opencontainers.image.title="Unit (python3.11-slim)"
LABEL org.opencontainers.image.description="Official build of Unit for Docker." LABEL org.opencontainers.image.description="Official build of Unit for Docker."
LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.url="https://unit.nginx.org"
LABEL org.opencontainers.image.source="https://github.com/nginx/unit" LABEL org.opencontainers.image.source="https://github.com/nginx/unit"
LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images" LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images"
LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers <docker-maint@nginx.com>" LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers <docker-maint@nginx.com>"
LABEL org.opencontainers.image.version="1.33.0" LABEL org.opencontainers.image.version="1.34.1"
RUN set -ex \ RUN set -ex \
&& savedAptMark="$(apt-mark showmanual)" \ && savedAptMark="$(apt-mark showmanual)" \
&& apt-get update \ && apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y ca-certificates git build-essential libssl-dev libpcre2-dev curl pkg-config \ && apt-get install --no-install-recommends --no-install-suggests -y \
ca-certificates git build-essential libssl-dev libpcre2-dev curl pkg-config libclang-dev cmake \
&& export RUST_VERSION=1.83.0 \
&& export RUSTUP_HOME=/usr/src/unit/rustup \
&& export CARGO_HOME=/usr/src/unit/cargo \
&& export PATH=/usr/src/unit/cargo/bin:$PATH \
&& dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
amd64) rustArch="x86_64-unknown-linux-gnu"; rustupSha256="6aeece6993e902708983b209d04c0d1dbb14ebb405ddb87def578d41f920f56d" ;; \
arm64) rustArch="aarch64-unknown-linux-gnu"; rustupSha256="1cffbf51e63e634c746f741de50649bbbcbd9dbe1de363c9ecef64e278dba2b2" ;; \
*) echo >&2 "unsupported architecture: ${dpkgArch}"; exit 1 ;; \
esac \
&& url="https://static.rust-lang.org/rustup/archive/1.27.1/${rustArch}/rustup-init" \
&& curl -L -O "$url" \
&& echo "${rustupSha256} *rustup-init" | sha256sum -c - \
&& chmod +x rustup-init \
&& ./rustup-init -y --no-modify-path --profile minimal --default-toolchain $RUST_VERSION --default-host ${rustArch} \
&& rm rustup-init \
&& rustup --version \
&& cargo --version \
&& rustc --version \
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
&& mkdir -p /usr/src/unit \ && mkdir -p /usr/src/unit \
&& cd /usr/src/unit \ && cd /usr/src/unit \
&& git clone --depth 1 -b 1.33.0-1 https://github.com/nginx/unit \ && git clone --depth 1 -b 1.34.1-1 https://github.com/nginx/unit \
&& cd unit \ && cd unit \
&& NCPU="$(getconf _NPROCESSORS_ONLN)" \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \
&& DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ && DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \
@@ -34,7 +54,8 @@ RUN set -ex \
--openssl \ --openssl \
--libdir=/usr/lib/$DEB_HOST_MULTIARCH" \ --libdir=/usr/lib/$DEB_HOST_MULTIARCH" \
&& CONFIGURE_ARGS="$CONFIGURE_ARGS_MODULES \ && CONFIGURE_ARGS="$CONFIGURE_ARGS_MODULES \
--njs" \ --njs \
--otel" \
&& make -j $NCPU -C pkg/contrib .njs \ && make -j $NCPU -C pkg/contrib .njs \
&& export PKG_CONFIG_PATH=$(pwd)/pkg/contrib/njs/build \ && export PKG_CONFIG_PATH=$(pwd)/pkg/contrib/njs/build \
&& ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modulesdir=/usr/lib/unit/debug-modules --debug \ && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modulesdir=/usr/lib/unit/debug-modules --debug \
@@ -86,4 +107,4 @@ STOPSIGNAL SIGTERM
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
EXPOSE 80 EXPOSE 80
CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"] CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"]

View File

@@ -1,21 +1,41 @@
FROM python:3.12-slim FROM python:3.12-slim
LABEL org.opencontainers.image.title="Unit (python3.12)" LABEL org.opencontainers.image.title="Unit (python3.12-slim)"
LABEL org.opencontainers.image.description="Official build of Unit for Docker." LABEL org.opencontainers.image.description="Official build of Unit for Docker."
LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.url="https://unit.nginx.org"
LABEL org.opencontainers.image.source="https://github.com/nginx/unit" LABEL org.opencontainers.image.source="https://github.com/nginx/unit"
LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images" LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images"
LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers <docker-maint@nginx.com>" LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers <docker-maint@nginx.com>"
LABEL org.opencontainers.image.version="1.33.0" LABEL org.opencontainers.image.version="1.34.1"
RUN set -ex \ RUN set -ex \
&& savedAptMark="$(apt-mark showmanual)" \ && savedAptMark="$(apt-mark showmanual)" \
&& apt-get update \ && apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y ca-certificates git build-essential libssl-dev libpcre2-dev curl pkg-config \ && apt-get install --no-install-recommends --no-install-suggests -y \
ca-certificates git build-essential libssl-dev libpcre2-dev curl pkg-config libclang-dev cmake \
&& export RUST_VERSION=1.83.0 \
&& export RUSTUP_HOME=/usr/src/unit/rustup \
&& export CARGO_HOME=/usr/src/unit/cargo \
&& export PATH=/usr/src/unit/cargo/bin:$PATH \
&& dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
amd64) rustArch="x86_64-unknown-linux-gnu"; rustupSha256="6aeece6993e902708983b209d04c0d1dbb14ebb405ddb87def578d41f920f56d" ;; \
arm64) rustArch="aarch64-unknown-linux-gnu"; rustupSha256="1cffbf51e63e634c746f741de50649bbbcbd9dbe1de363c9ecef64e278dba2b2" ;; \
*) echo >&2 "unsupported architecture: ${dpkgArch}"; exit 1 ;; \
esac \
&& url="https://static.rust-lang.org/rustup/archive/1.27.1/${rustArch}/rustup-init" \
&& curl -L -O "$url" \
&& echo "${rustupSha256} *rustup-init" | sha256sum -c - \
&& chmod +x rustup-init \
&& ./rustup-init -y --no-modify-path --profile minimal --default-toolchain $RUST_VERSION --default-host ${rustArch} \
&& rm rustup-init \
&& rustup --version \
&& cargo --version \
&& rustc --version \
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
&& mkdir -p /usr/src/unit \ && mkdir -p /usr/src/unit \
&& cd /usr/src/unit \ && cd /usr/src/unit \
&& git clone --depth 1 -b 1.33.0-1 https://github.com/nginx/unit \ && git clone --depth 1 -b 1.34.1-1 https://github.com/nginx/unit \
&& cd unit \ && cd unit \
&& NCPU="$(getconf _NPROCESSORS_ONLN)" \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \
&& DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ && DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \
@@ -34,7 +54,8 @@ RUN set -ex \
--openssl \ --openssl \
--libdir=/usr/lib/$DEB_HOST_MULTIARCH" \ --libdir=/usr/lib/$DEB_HOST_MULTIARCH" \
&& CONFIGURE_ARGS="$CONFIGURE_ARGS_MODULES \ && CONFIGURE_ARGS="$CONFIGURE_ARGS_MODULES \
--njs" \ --njs \
--otel" \
&& make -j $NCPU -C pkg/contrib .njs \ && make -j $NCPU -C pkg/contrib .njs \
&& export PKG_CONFIG_PATH=$(pwd)/pkg/contrib/njs/build \ && export PKG_CONFIG_PATH=$(pwd)/pkg/contrib/njs/build \
&& ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modulesdir=/usr/lib/unit/debug-modules --debug \ && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modulesdir=/usr/lib/unit/debug-modules --debug \
@@ -86,4 +107,4 @@ STOPSIGNAL SIGTERM
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
EXPOSE 80 EXPOSE 80
CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"] CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"]

View File

@@ -1,21 +1,41 @@
FROM python:3.13-slim FROM python:3.13-slim
LABEL org.opencontainers.image.title="Unit (python3.13)" LABEL org.opencontainers.image.title="Unit (python3.13-slim)"
LABEL org.opencontainers.image.description="Official build of Unit for Docker." LABEL org.opencontainers.image.description="Official build of Unit for Docker."
LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.url="https://unit.nginx.org"
LABEL org.opencontainers.image.source="https://github.com/nginx/unit" LABEL org.opencontainers.image.source="https://github.com/nginx/unit"
LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images" LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images"
LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers <docker-maint@nginx.com>" LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers <docker-maint@nginx.com>"
LABEL org.opencontainers.image.version="1.33.0" LABEL org.opencontainers.image.version="1.34.1"
RUN set -ex \ RUN set -ex \
&& savedAptMark="$(apt-mark showmanual)" \ && savedAptMark="$(apt-mark showmanual)" \
&& apt-get update \ && apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y ca-certificates git build-essential libssl-dev libpcre2-dev curl pkg-config \ && apt-get install --no-install-recommends --no-install-suggests -y \
ca-certificates git build-essential libssl-dev libpcre2-dev curl pkg-config libclang-dev cmake \
&& export RUST_VERSION=1.83.0 \
&& export RUSTUP_HOME=/usr/src/unit/rustup \
&& export CARGO_HOME=/usr/src/unit/cargo \
&& export PATH=/usr/src/unit/cargo/bin:$PATH \
&& dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
amd64) rustArch="x86_64-unknown-linux-gnu"; rustupSha256="6aeece6993e902708983b209d04c0d1dbb14ebb405ddb87def578d41f920f56d" ;; \
arm64) rustArch="aarch64-unknown-linux-gnu"; rustupSha256="1cffbf51e63e634c746f741de50649bbbcbd9dbe1de363c9ecef64e278dba2b2" ;; \
*) echo >&2 "unsupported architecture: ${dpkgArch}"; exit 1 ;; \
esac \
&& url="https://static.rust-lang.org/rustup/archive/1.27.1/${rustArch}/rustup-init" \
&& curl -L -O "$url" \
&& echo "${rustupSha256} *rustup-init" | sha256sum -c - \
&& chmod +x rustup-init \
&& ./rustup-init -y --no-modify-path --profile minimal --default-toolchain $RUST_VERSION --default-host ${rustArch} \
&& rm rustup-init \
&& rustup --version \
&& cargo --version \
&& rustc --version \
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
&& mkdir -p /usr/src/unit \ && mkdir -p /usr/src/unit \
&& cd /usr/src/unit \ && cd /usr/src/unit \
&& git clone --depth 1 -b 1.33.0-1 https://github.com/nginx/unit \ && git clone --depth 1 -b 1.34.1-1 https://github.com/nginx/unit \
&& cd unit \ && cd unit \
&& NCPU="$(getconf _NPROCESSORS_ONLN)" \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \
&& DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ && DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \
@@ -34,7 +54,8 @@ RUN set -ex \
--openssl \ --openssl \
--libdir=/usr/lib/$DEB_HOST_MULTIARCH" \ --libdir=/usr/lib/$DEB_HOST_MULTIARCH" \
&& CONFIGURE_ARGS="$CONFIGURE_ARGS_MODULES \ && CONFIGURE_ARGS="$CONFIGURE_ARGS_MODULES \
--njs" \ --njs \
--otel" \
&& make -j $NCPU -C pkg/contrib .njs \ && make -j $NCPU -C pkg/contrib .njs \
&& export PKG_CONFIG_PATH=$(pwd)/pkg/contrib/njs/build \ && export PKG_CONFIG_PATH=$(pwd)/pkg/contrib/njs/build \
&& ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modulesdir=/usr/lib/unit/debug-modules --debug \ && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modulesdir=/usr/lib/unit/debug-modules --debug \
@@ -86,4 +107,4 @@ STOPSIGNAL SIGTERM
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
EXPOSE 80 EXPOSE 80
CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"] CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"]