Skip to content

Commit 6726b0c

Browse files
committed
Add python3-uno and zint in docker image
1 parent c22b68c commit 6726b0c

File tree

3 files changed

+44
-19
lines changed

3 files changed

+44
-19
lines changed

docker/Dockerfile

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
FROM harbor.imio.be/common/plone-base:6.1.0 AS builder
1+
FROM harbor.imio.be/common/plone-base:6.1.2 AS builder
22

33
ENV ZC_BUILDOUT=4.1.4 \
4-
PLONE_MAJOR=6.1 \
5-
PLONE_VERSION=6.1.0
4+
PLONE_MAJOR=6.1 \
5+
PLONE_VERSION=6.1.2
66

7-
# hadolint ignore=DL3008
87
RUN apt-get update && apt-get install -y --no-install-recommends \
98
build-essential \
109
gcc \
@@ -22,19 +21,33 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
2221
libxml2-dev \
2322
libxslt1-dev \
2423
python3-dev \
24+
python3.12-venv \
2525
python3-pip \
2626
wget \
2727
zlib1g-dev \
2828
&& pip3 install --no-cache-dir --break-system-packages zc.buildout==$ZC_BUILDOUT py-spy
2929

30+
USER imio
3031
WORKDIR /plone
3132

33+
RUN python3 -m venv /plone
34+
COPY --chown=imio requirements.txt /plone
35+
RUN /plone/bin/pip install -r requirements.txt \
36+
&& /plone/bin/pip install py-spy
37+
3238
COPY --chown=imio *.cfg /plone/
3339
COPY --chown=imio scripts /plone/scripts
3440

35-
RUN su -c "buildout -c docker.cfg -t 30 -N" -s /bin/sh imio
41+
RUN /plone/bin/buildout -c docker.cfg -t 30 -N
42+
43+
#
44+
#FROM ubuntu:24.04 AS uno_src
45+
#RUN apt-get update && apt-get install -y --no-install-recommends \
46+
# python3.12 python3-uno libreoffice-core \
47+
# && rm -rf /var/lib/apt/lists/*
3648

37-
FROM harbor.imio.be/common/plone-base:6.1.0
49+
50+
FROM harbor.imio.be/common/plone-base:6.1.2
3851
ARG build_number
3952
ENV ZC_BUILDOUT=4.1.4 \
4053
PLONE_VERSION=6.1.0 \
@@ -58,25 +71,37 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
5871
libxslt1.1 \
5972
lynx \
6073
netcat-openbsd \
74+
python3-uno \
6175
poppler-utils \
6276
rsync \
6377
wget \
6478
wv \
79+
zint \
6580
&& apt-get clean \
6681
&& rm -rf /var/lib/apt/lists/*
67-
RUN curl -L https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_amd64.deb > /tmp/dumb-init.deb && dpkg -i /tmp/dumb-init.deb && rm /tmp/dumb-init.deb
82+
RUN curl -L https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_amd64.deb > /tmp/dumb-init.deb \
83+
&& dpkg -i /tmp/dumb-init.deb && rm /tmp/dumb-init.deb
84+
COPY --chown=imio --from=builder /plone /plone
6885
COPY --from=builder /usr/local/bin/py-spy /usr/local/bin/py-spy
69-
COPY --chown=imio --from=builder /plone .
70-
COPY --from=builder /usr/local/lib/python3.12/dist-packages /usr/local/lib/python3.12/dist-packages
7186
COPY --chown=imio docker/docker-initialize.py docker/docker-entrypoint.sh docker/cron.sh docker/tick.sh /
7287

88+
#COPY --from=uno_src /usr/lib/python3/dist-packages/uno.py /usr/lib/python3/dist-packages/uno.py
89+
#COPY --from=uno_src /usr/lib/python3/dist-packages/unohelper.py /usr/lib/python3/dist-packages/unohelper.py
90+
#COPY --from=uno_src /usr/lib/libreoffice/program /usr/lib/libreoffice/program
91+
92+
# Ensure UNO_PATH is set to where libreoffice is installed
93+
ENV UNO_PATH=/usr/lib/libreoffice/program
94+
7395
# Allow imio to create a cron job
7496
RUN touch /etc/cron.d/plone-tick \
7597
&& crontab -u imio /etc/cron.d/plone-tick \
7698
&& chmod u+s /usr/sbin/cron
7799

78100
RUN echo $build_number > .build_number
79101

102+
# Make the venv first on PATH at runtime
103+
ENV PATH="/plone/bin:${PATH}"
104+
80105
USER imio
81106
EXPOSE 8081
82107
HEALTHCHECK --interval=15s --timeout=10s --start-period=20s --retries=5 \

requirements.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
packaging==24.2
2-
pip==25.0.1
3-
setuptools==75.8.2
4-
wheel==0.45.1
5-
zc.buildout==4.1.4
1+
packaging==25.0
2+
pip==25.1.1
3+
setuptools==80.9.0
4+
wheel==0.46.1
5+
zc.buildout==4.1.12

versions.cfg

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[versions]
2-
packaging = 24.2
3-
pip = 25.0.1
4-
setuptools = 75.8.2
5-
wheel = 0.45.1
6-
zc.buildout = 4.1.4
2+
packaging = 25.0
3+
pip = 25.1.1
4+
setuptools = 80.9.0
5+
wheel = 0.46.1
6+
zc.buildout = 4.1.12
77

88
plonemeeting.portal.core = 2.2.1
99
collective.documentgenerator = 4.0

0 commit comments

Comments
 (0)