diff --git a/.github/workflows/image-release.yml b/.github/workflows/image-release.yml index a407990..d27227e 100644 --- a/.github/workflows/image-release.yml +++ b/.github/workflows/image-release.yml @@ -6,6 +6,9 @@ on: plone-version: required: true type: string + debian-version: + required: true + type: string image-name: required: true type: string diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7e5edcd..28b528e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,6 +31,7 @@ jobs: echo "PLATFORMS=$PLATFORMS" >> $GITHUB_OUTPUT echo "IS_LATEST=$IS_LATEST" >> $GITHUB_OUTPUT echo "PLONE_VERSION=$(cat version.txt)" >> $GITHUB_OUTPUT + echo "DEBIAN_VERSION=$(cat version-debian.txt)" >> $GITHUB_OUTPUT builder-image: needs: @@ -38,6 +39,7 @@ jobs: uses: ./.github/workflows/image-release.yml with: plone-version: ${{ needs.meta.outputs.PLONE_VERSION }} + debian-version: ${{ needs.meta.outputs.DEBIAN_VERSION }} image-name: ${{ needs.meta.outputs.BASE_IMAGE_NAME }}-builder dockerfile: Dockerfile.builder platforms: ${{ needs.meta.outputs.PLATFORMS }} @@ -54,6 +56,7 @@ jobs: uses: ./.github/workflows/image-release.yml with: plone-version: ${{ needs.meta.outputs.PLONE_VERSION }} + debian-version: ${{ needs.meta.outputs.DEBIAN_VERSION }} image-name: ${{ needs.meta.outputs.BASE_IMAGE_NAME }}-prod-config dockerfile: Dockerfile.prod platforms: ${{ needs.meta.outputs.PLATFORMS }} @@ -72,6 +75,7 @@ jobs: uses: ./.github/workflows/image-release.yml with: plone-version: ${{ needs.meta.outputs.PLONE_VERSION }} + debian-version: ${{ needs.meta.outputs.DEBIAN_VERSION }} image-name: ${{ needs.meta.outputs.BASE_IMAGE_NAME }}-dev dockerfile: Dockerfile.dev platforms: ${{ needs.meta.outputs.PLATFORMS }} @@ -91,6 +95,7 @@ jobs: uses: ./.github/workflows/image-release.yml with: plone-version: ${{ needs.meta.outputs.PLONE_VERSION }} + debian-version: ${{ needs.meta.outputs.DEBIAN_VERSION }} image-name: ${{ needs.meta.outputs.BASE_IMAGE_NAME }}-acceptance dockerfile: Dockerfile.acceptance platforms: ${{ needs.meta.outputs.PLATFORMS }} @@ -111,6 +116,7 @@ jobs: uses: ./.github/workflows/image-release.yml with: plone-version: ${{ needs.meta.outputs.PLONE_VERSION }} + debian-version: ${{ needs.meta.outputs.DEBIAN_VERSION }} image-name: | ghcr.io/plone/server ghcr.io/plone/plone-backend @@ -134,6 +140,7 @@ jobs: uses: ./.github/workflows/image-release.yml with: plone-version: ${{ needs.meta.outputs.PLONE_VERSION }} + debian-version: ${{ needs.meta.outputs.DEBIAN_VERSION }} image-name: | ghcr.io/plone/plone-classicui plone/plone-classicui diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5eecd78..70859da 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,6 +15,7 @@ jobs: outputs: SHA: ${{ steps.vars.outputs.SHA }} PLONE_VERSION: ${{ steps.vars.outputs.PLONE_VERSION }} + DEBIAN_VERSION: ${{ steps.vars.outputs.DEBIAN_VERSION }} steps: - name: Checkout uses: actions/checkout@v4 @@ -24,6 +25,7 @@ jobs: run: | echo "SHA=sha-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT echo "PLONE_VERSION=$(cat version.txt)" >> $GITHUB_OUTPUT + echo "DEBIAN_VERSION=$(cat version-debian.txt)" >> $GITHUB_OUTPUT test: runs-on: ubuntu-latest @@ -80,6 +82,7 @@ jobs: push: true build-args: | PLONE_VERSION=${{ needs.meta.outputs.PLONE_VERSION }} + DEBIAN_VERSION=${{ needs.meta.outputs.DEBIAN_VERSION }} - name: Build prod-config image for testing uses: docker/build-push-action@v4 @@ -98,6 +101,7 @@ jobs: push: true build-args: | PLONE_VERSION=${{ needs.meta.outputs.SHA }} + DEBIAN_VERSION=${{ needs.meta.outputs.DEBIAN_VERSION }} - name: Test run: | diff --git a/Dockerfile.builder b/Dockerfile.builder index feee11d..e38ac81 100644 --- a/Dockerfile.builder +++ b/Dockerfile.builder @@ -1,6 +1,7 @@ # syntax=docker/dockerfile:1 ARG PYTHON_VERSION=3.11 -FROM python:${PYTHON_VERSION}-slim-bullseye +ARG DEBIAN_VERSION=bullseye +FROM python:${PYTHON_VERSION}-slim-${DEBIAN_VERSION} ARG PLONE_VERSION diff --git a/Dockerfile.nightly b/Dockerfile.nightly index a482272..60b2b73 100644 --- a/Dockerfile.nightly +++ b/Dockerfile.nightly @@ -1,6 +1,7 @@ # syntax=docker/dockerfile:1 ARG PYTHON_VERSION=3.11 -FROM python:${PYTHON_VERSION}-slim-bullseye as base +ARG DEBIAN_VERSION=bullseye +FROM python:${PYTHON_VERSION}-slim-${DEBIAN_VERSION} as base FROM base as builder ENV PIP_PARAMS="" diff --git a/Dockerfile.prod b/Dockerfile.prod index f165dc5..5c21950 100644 --- a/Dockerfile.prod +++ b/Dockerfile.prod @@ -1,6 +1,7 @@ # syntax=docker/dockerfile:1 ARG PYTHON_VERSION=3.11 -FROM python:${PYTHON_VERSION}-slim-bullseye +ARG DEBIAN_VERSION=bullseye +FROM python:${PYTHON_VERSION}-slim-${DEBIAN_VERSION} LABEL maintainer="Plone Community " \ org.label-schema.name="server-prod-conf" \ diff --git a/Makefile b/Makefile index 1a9251b..e26b5ea 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,7 @@ MAIN_IMAGE_NAME=plone/plone-backend CLASSICUI_IMAGE_NAME=plone/plone-classicui BASE_IMAGE_NAME=plone/server PLONE_VERSION=$$(cat version.txt) +DEBIAN_VERSION=$$(cat version-debian.txt) IMAGE_TAG=${PLONE_VERSION} NIGHTLY_IMAGE_TAG=nightly @@ -68,7 +69,7 @@ show-image: ## Print Version .PHONY: image-builder image-builder: ## Build Base Image @echo "Building $(BASE_IMAGE_NAME)-builder:$(IMAGE_TAG)" - @docker buildx build . --build-arg PLONE_VERSION=${PLONE_VERSION} -t $(BASE_IMAGE_NAME)-builder:$(IMAGE_TAG) -f Dockerfile.builder --load + @docker buildx build . --build-arg PLONE_VERSION=${PLONE_VERSION} --build-arg DEBIAN_VERSION=${DEBIAN_VERSION} -t $(BASE_IMAGE_NAME)-builder:$(IMAGE_TAG) -f Dockerfile.builder --load .PHONY: image-dev image-dev: ## Build Dev Image @@ -78,7 +79,7 @@ image-dev: ## Build Dev Image .PHONY: image-prod-config image-prod-config: ## Build Prod Image @echo "Building $(BASE_IMAGE_NAME)-prod-config:$(IMAGE_TAG)" - @docker buildx build . --build-arg PLONE_VERSION=${PLONE_VERSION} -t $(BASE_IMAGE_NAME)-prod-config:$(IMAGE_TAG) -f Dockerfile.prod --load + @docker buildx build . --build-arg PLONE_VERSION=${PLONE_VERSION} --build-arg DEBIAN_VERSION=${DEBIAN_VERSION} -t $(BASE_IMAGE_NAME)-prod-config:$(IMAGE_TAG) -f Dockerfile.prod --load .PHONY: image-classicui image-classicui: ## Build Classic UI @@ -98,7 +99,7 @@ image-main: ## Build main image .PHONY: image-nightly image-nightly: ## Build Docker Image Nightly @echo "Building $(MAIN_IMAGE_NAME):$(NIGHTLY_IMAGE_TAG)" - @docker build . -t $(MAIN_IMAGE_NAME):$(NIGHTLY_IMAGE_TAG) -f Dockerfile.nightly + @docker build . --build-arg DEBIAN_VERSION=${DEBIAN_VERSION} -t $(MAIN_IMAGE_NAME):$(NIGHTLY_IMAGE_TAG) -f Dockerfile.nightly .PHONY: build-images build-images: ## Build Images diff --git a/version-debian.txt b/version-debian.txt new file mode 100644 index 0000000..91bf492 --- /dev/null +++ b/version-debian.txt @@ -0,0 +1 @@ +bullseye \ No newline at end of file