-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Dockerfile.prod
45 lines (37 loc) · 1.51 KB
/
Dockerfile.prod
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# syntax=docker/dockerfile:1
ARG PYTHON_VERSION=3.11
FROM python:${PYTHON_VERSION}-slim-bullseye
LABEL maintainer="Plone Community <[email protected]>" \
org.label-schema.name="server-prod-conf" \
org.label-schema.description="Plone $PLONE_VERSION development image using Python $PYTHON_VERSION" \
org.label-schema.vendor="Plone Foundation"
# Create plone use, install run time dependencies, set up busybox
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"
apt-get update
apt-get -y upgrade
apt-get install -y --no-install-recommends $runDeps
apt-get clean -y
busybox --install -s
rm -rf /var/lib/apt/lists/* /usr/share/doc
bash -c 'mkdir -p /data/{filestorage,blobstorage,cache,logs}'
chown -R 500:500 /data
EOT
# Disable debug mode
ENV DEBUG_MODE off
# Set chameleon cache directory
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=
# Expose /data as a volume
VOLUME /data
# Expose Zope Port
EXPOSE 8080
# Use /app as the workdir
WORKDIR /app
# Set healthcheck to port 8080
HEALTHCHECK --interval=10s --timeout=5s --start-period=60s CMD [ -n "$LISTEN_PORT" ] || LISTEN_PORT=8080 ; wget -q http://127.0.0.1:"$LISTEN_PORT"/ok -O - | grep OK || exit 1
ENTRYPOINT [ "/app/docker-entrypoint.sh" ]
CMD ["start"]