Skip to content

Commit

Permalink
Cleanup and fix build dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
jensens committed Dec 1, 2022
1 parent ce44dd4 commit 25f7f35
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ 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.0rc1
ENV EXTRA_PACKAGES="relstorage==3.4.5 psycopg2==2.9.3 python-ldap==3.4.0"

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 @@ -39,7 +39,7 @@ 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 build-essential"
apt-get update
apt-get install -y --no-install-recommends $runDeps
apt-get clean -y
Expand Down

0 comments on commit 25f7f35

Please sign in to comment.