-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use bookworm/debian 12, python 3.12, update python deps, fix buildx w…
…arnings (#162) Fix buildx warning for ARG and ENV usage. update relstorage, python-ldap, add sasl2 for ldap installation. Fix libtiff5 to 6 Update and pin pip and wheel Remove importlibmetadata env var for older pip issue. Fix FROM/as casing warning from buildx.
- Loading branch information
Showing
9 changed files
with
69 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
# syntax=docker/dockerfile:1 | ||
ARG PYTHON_VERSION=3.11 | ||
ARG PYTHON_VERSION=3.12 | ||
ARG PLONE_VERSION | ||
FROM plone/server-builder:${PLONE_VERSION} as builder | ||
FROM plone/server-builder:${PLONE_VERSION} AS builder | ||
|
||
ARG PLONE_VERSION | ||
|
||
FROM plone/server-prod-config:${PLONE_VERSION} | ||
|
||
ARG PYTHON_VERSION | ||
ARG PLONE_VERSION | ||
|
||
LABEL maintainer="Plone Community <[email protected]>" \ | ||
org.label-schema.name="plone-backend" \ | ||
org.label-schema.description="Plone backend image using Python $PYTHON_VERSION" \ | ||
org.label-schema.description="Plone $PLONE_VERSION backend image using Python $PYTHON_VERSION" \ | ||
org.label-schema.vendor="Plone Foundation" | ||
|
||
# Use /app as the workdir | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
# syntax=docker/dockerfile:1 | ||
ARG PYTHON_VERSION=3.11 | ||
ARG PYTHON_VERSION=3.12 | ||
ARG PLONE_VERSION | ||
FROM plone/server-builder:${PLONE_VERSION} as builder | ||
FROM plone/server-builder:${PLONE_VERSION} AS builder | ||
|
||
# https://github.com/pypa/pip/issues/12079 | ||
ENV _PIP_USE_IMPORTLIB_METADATA=0 | ||
ARG PLONE_VERSION | ||
|
||
# Install robotframework support | ||
RUN /app/bin/pip install plone.app.robotframework>=2.0.0 | ||
|
||
FROM plone/server-prod-config:${PLONE_VERSION} | ||
|
||
ARG PYTHON_VERSION | ||
ARG PLONE_VERSION | ||
|
||
LABEL maintainer="Plone Community <[email protected]>" \ | ||
org.label-schema.name="server-acceptance" \ | ||
org.label-schema.description="Plone $PLONE_VERSION backend acceptance image using Python $PYTHON_VERSION" \ | ||
|
@@ -21,7 +23,7 @@ LABEL maintainer="Plone Community <[email protected]>" \ | |
COPY --from=builder --chown=500:500 /app /app | ||
|
||
# Set chameleon cache directory | ||
ENV CHAMELEON_CACHE /app/var/cache | ||
ENV CHAMELEON_CACHE=/app/var/cache | ||
# Zope listens to all ip addresses | ||
ENV ZSERVER_HOST=0.0.0.0 | ||
# Zope port to be 55001 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
# syntax=docker/dockerfile:1 | ||
ARG PYTHON_VERSION=3.11 | ||
FROM python:${PYTHON_VERSION}-slim-bullseye | ||
ARG PYTHON_VERSION=3.12 | ||
FROM python:${PYTHON_VERSION}-slim-bookworm | ||
|
||
ARG PLONE_VERSION | ||
|
||
ENV EXTRA_PACKAGES="relstorage==3.5.0 psycopg2==2.9.5 python-ldap==3.4.3 ZEO" | ||
ENV EXTRA_PACKAGES="relstorage==4.1.1 psycopg2==2.9.10 python-ldap==3.4.4 ZEO" | ||
|
||
|
||
LABEL maintainer="Plone Community <[email protected]>" \ | ||
|
@@ -28,7 +28,7 @@ RUN <<EOT | |
set -e | ||
apt-get update | ||
apt-get -y upgrade | ||
buildDeps="build-essential busybox ca-certificates curl git gosu libbz2-dev libffi-dev libjpeg62-turbo-dev libmagic1 libldap2-dev libopenjp2-7-dev libpcre3-dev libpq-dev libsasl2-dev libssl-dev libtiff5-dev libxml2-dev libxslt1-dev wget zlib1g-dev" | ||
buildDeps="build-essential busybox ca-certificates curl git gosu libbz2-dev libffi-dev libjpeg62-turbo-dev libmagic1 libsasl2-dev libldap2-dev libopenjp2-7-dev libpcre3-dev libpq-dev libssl-dev libtiff6 libtiff5-dev libxml2-dev libxslt1-dev wget zlib1g-dev" | ||
apt-get install -y --no-install-recommends $buildDeps | ||
busybox --install -s | ||
python -m venv /app | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
# syntax=docker/dockerfile:1 | ||
ARG PYTHON_VERSION=3.11 | ||
ARG PYTHON_VERSION=3.12 | ||
ARG PLONE_VERSION | ||
FROM plone/server-builder:${PLONE_VERSION} as builder | ||
FROM plone/server-builder:${PLONE_VERSION} AS builder | ||
|
||
# Remove Volto support from builder image | ||
ARG PLONE_VERSION | ||
|
||
# Remove Volto support from builder image, this is Classic UI | ||
RUN /app/bin/pip uninstall -y plone.volto | ||
|
||
FROM plone/server-prod-config:${PLONE_VERSION} | ||
|
||
ARG PYTHON_VERSION | ||
ARG PLONE_VERSION | ||
|
||
LABEL maintainer="Plone Community <[email protected]>" \ | ||
org.label-schema.name="plone-classicui" \ | ||
org.label-schema.description="Plone $PLONE_VERSION Classic UI image using Python $PYTHON_VERSION" \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
# syntax=docker/dockerfile:1 | ||
ARG PYTHON_VERSION=3.11 | ||
ARG PYTHON_VERSION=3.12 | ||
ARG PLONE_VERSION | ||
FROM plone/server-builder:${PLONE_VERSION} | ||
|
||
ARG PYTHON_VERSION | ||
ARG PLONE_VERSION | ||
|
||
LABEL maintainer="Plone Community <[email protected]>" \ | ||
org.label-schema.name="server-dev" \ | ||
|
@@ -19,15 +21,15 @@ RUN <<EOT | |
EOT | ||
|
||
# Turns off buffering | ||
ENV PYTHONUNBUFFERED 1 | ||
ENV PYTHONUNBUFFERED=1 | ||
# Keeps Python from generating .pyc files | ||
ENV PYTHONDONTWRITEBYTECODE 1 | ||
ENV PYTHONDONTWRITEBYTECODE=1 | ||
# Enable Application server in debug mode | ||
ENV DEBUG_MODE on | ||
ENV DEBUG_MODE=on | ||
# Disable compilation of po files into mo files | ||
ENV zope_i18n_compile_mo_files= | ||
# Set chameleon cache directory | ||
ENV CHAMELEON_CACHE /app/var/cache | ||
ENV CHAMELEON_CACHE=/app/var/cache | ||
# Expose Zope Port | ||
EXPOSE 8080 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
# syntax=docker/dockerfile:1 | ||
ARG PYTHON_VERSION=3.11 | ||
FROM python:${PYTHON_VERSION}-slim-bullseye as base | ||
FROM base as builder | ||
ARG PYTHON_VERSION=3.12 | ||
FROM python:${PYTHON_VERSION}-slim-bookworm AS base | ||
FROM base AS builder | ||
|
||
ENV PIP_PARAMS="" | ||
ENV PIP_VERSION=22.3.1 | ||
ENV EXTRA_PACKAGES="relstorage==3.5.0 psycopg2==2.9.5 python-ldap==3.4.3" | ||
ENV PIP_VERSION=24.3.1 | ||
ENV EXTRA_PACKAGES="relstorage==4.1.1 psycopg2==2.9.10 python-ldap==3.4.4" | ||
|
||
RUN mkdir /wheelhouse | ||
|
||
RUN <<EOT | ||
set -e | ||
apt-get update | ||
buildDeps="build-essential curl libbz2-dev libffi-dev libjpeg62-turbo-dev libldap2-dev libopenjp2-7-dev libpcre3-dev libpq-dev libsasl2-dev libssl-dev libtiff5-dev libxml2-dev libxslt1-dev wget unzip zlib1g-dev" | ||
buildDeps="build-essential curl libbz2-dev libffi-dev libjpeg62-turbo-dev libsasl2-dev libldap2-dev libopenjp2-7-dev libpcre3-dev libpq-dev libssl-dev libtiff6 libtiff5-dev libxml2-dev libxslt1-dev wget unzip zlib1g-dev" | ||
apt-get install -y --no-install-recommends $buildDeps | ||
pip install -U "pip==${PIP_VERSION}" | ||
pip install -U "zc.buildout>=3.0.0rc1" "wheel" | ||
pip install -U "zc.buildout==4.0" "wheel==0.45.1" | ||
rm -rf /var/lib/apt/lists/* /usr/share/doc | ||
curl -L -o workspace.zip https://github.com/plone/buildout.coredev/archive/refs/heads/6.0.zip | ||
curl -L -o workspace.zip https://github.com/plone/buildout.coredev/archive/refs/heads/6.1.zip | ||
unzip workspace.zip | ||
mv buildout.coredev-6.0 /workspace | ||
mv buildout.coredev-6.1 /workspace | ||
EOT | ||
|
||
WORKDIR /workspace | ||
|
@@ -36,7 +36,7 @@ EOT | |
FROM base | ||
|
||
ENV PIP_PARAMS="" | ||
ENV PIP_VERSION=22.0.4 | ||
ENV PIP_VERSION=24.3.1 | ||
|
||
LABEL maintainer="Plone Community <[email protected]>" \ | ||
org.label-schema.name="plone-backend" \ | ||
|
@@ -48,7 +48,7 @@ COPY --from=builder /wheelhouse /wheelhouse | |
RUN <<EOT | ||
set -e | ||
useradd --system -m -d /app -U -u 500 plone | ||
runDeps="git libjpeg62 libopenjp2-7 libpq5 libtiff5 libxml2 libxslt1.1 lynx netcat poppler-utils rsync wv busybox libmagic1 gosu make" | ||
runDeps="git libjpeg62 libopenjp2-7 libpq5 libtiff6 libxml2 libxslt1.1 lynx netcat-openbsd poppler-utils rsync wv busybox libmagic1 gosu make" | ||
apt-get update | ||
apt-get install -y --no-install-recommends $runDeps | ||
busybox --install -s | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
# syntax=docker/dockerfile:1 | ||
ARG PYTHON_VERSION=3.11 | ||
FROM python:${PYTHON_VERSION}-slim-bullseye | ||
ARG PYTHON_VERSION=3.12 | ||
ARG PLONE_VERSION | ||
FROM python:${PYTHON_VERSION}-slim-bookworm | ||
|
||
ARG PYTHON_VERSION | ||
ARG PLONE_VERSION | ||
|
||
LABEL maintainer="Plone Community <[email protected]>" \ | ||
org.label-schema.name="server-prod-conf" \ | ||
|
@@ -11,7 +15,7 @@ LABEL maintainer="Plone Community <[email protected]>" \ | |
RUN <<EOT | ||
set -e | ||
useradd --system -m -d /app -U -u 500 plone | ||
runDeps="ca-certificates git libjpeg62 libopenjp2-7 libpq5 libtiff5 libxml2 libxslt1.1 lynx netcat poppler-utils rsync wv busybox gosu libmagic1 make" | ||
runDeps="ca-certificates git libjpeg62 libopenjp2-7 libpq5 libtiff6 libxml2 libxslt1.1 lynx netcat-openbsd poppler-utils rsync wv busybox gosu libmagic1 make" | ||
apt-get update | ||
apt-get -y upgrade | ||
apt-get install -y --no-install-recommends $runDeps | ||
|
@@ -23,9 +27,9 @@ RUN <<EOT | |
EOT | ||
|
||
# Disable debug mode | ||
ENV DEBUG_MODE off | ||
ENV DEBUG_MODE=off | ||
# Set chameleon cache directory | ||
ENV CHAMELEON_CACHE /app/var/cache | ||
ENV CHAMELEON_CACHE=/app/var/cache | ||
# Disable compilation of po files into mo files (This should be done in the builder image) | ||
ENV zope_i18n_compile_mo_files= | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters