Skip to content

Commit

Permalink
Use Python 3.11 (#95)
Browse files Browse the repository at this point in the history
- Use Python 3.11
- Cleanup dependencies (Debian, pip), partially addresses #89 
- fixes #75
  • Loading branch information
jensens authored Dec 6, 2022
2 parents 634e16f + ade5c45 commit 9843aa9
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 24 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ jobs:
uses: docker/metadata-action@v4
with:
images: |
plone/plone-backend
ghcr.io/plone/plone-backend
tags: |
type=raw,value=test
type=sha
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand All @@ -37,8 +37,9 @@ jobs:
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build image for testing
uses: docker/build-push-action@v3
Expand All @@ -50,4 +51,4 @@ jobs:

- name: Test
run: |
./test/run.sh plone/plone-backend:test
./test/run.sh ${{ steps.meta.outputs.tags }}
13 changes: 7 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# syntax=docker/dockerfile:1
ARG PYTHON_VERSION=3.10
ARG PYTHON_VERSION=3.11
FROM python:${PYTHON_VERSION}-slim-bullseye as base
FROM base as builder

ENV PIP_PARAMS=""
ENV PIP_VERSION=22.2.2
ENV PIP_VERSION=22.3.1
ENV PLONE_VERSION=6.0.0rc2
ENV EXTRA_PACKAGES="relstorage==3.5.0 psycopg2==2.9.5 python-ldap==3.4.3"

RUN <<EOT
apt-get update
buildDeps="dpkg-dev gcc libbz2-dev libc6-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 zlib1g-dev python3-dev build-essential"
buildDeps="build-essential 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 zlib1g-dev"
apt-get install -y --no-install-recommends $buildDeps
rm -rf /var/lib/apt/lists/* /usr/share/doc
python -m venv /app
/app/bin/pip install -U "pip==${PIP_VERSION}"
/app/bin/pip install Plone plone.volto ${EXTRA_PACKAGES} -c https://dist.plone.org/release/$PLONE_VERSION/constraints.txt ${PIP_PARAMS}
/app/bin/pip install -U "pip==${PIP_VERSION}" wheel
/app/bin/pip install Plone ${EXTRA_PACKAGES} -c https://dist.plone.org/release/$PLONE_VERSION/constraints.txt ${PIP_PARAMS}
find /app \( -type f -a -name '*.pyc' -o -name '*.pyo' \) -exec rm -rf '{}' +
EOT

Expand All @@ -37,8 +37,9 @@ WORKDIR /app
COPY --from=builder --chown=500:500 /app /app

RUN <<EOT
ls -la /app/bin
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 gosu libmagic1 make"
runDeps="git libjpeg62 libopenjp2-7 libpq5 libtiff5 libxml2 libxslt1.1 lynx netcat poppler-utils rsync wv busybox gosu libmagic1"
apt-get update
apt-get install -y --no-install-recommends $runDeps
apt-get clean -y
Expand Down
29 changes: 16 additions & 13 deletions test/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,24 @@ globalTests+=(
override-cmd
)

imageTests_main_set='
plone-basics
plone-develop
plone-site
plone-addons
plone-cors
plone-arbitrary-user
plone-listenport
plone-zeoclient
plone-relstorage
plone-shared-blob-dir
'

imageTests+=(
[plone/plone-backend]='
plone-basics
plone-develop
plone-site
plone-addons
plone-cors
plone-arbitrary-user
plone-listenport
plone-zeoclient
plone-relstorage
plone-shared-blob-dir
'
[plone/plone-backend]=$imageTests_main_set
[ghcr.io/plone/plone-backend]=$imageTests_main_set
)

globalExcludeTests+=(

)

0 comments on commit 9843aa9

Please sign in to comment.