-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
91 lines (81 loc) · 2.52 KB
/
Dockerfile
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
FROM harbor.imio.be/common/plone-base:6.0.9-ubuntu as builder
LABEL maintainer="Benoît Suttor <[email protected]>"
ENV PIP=23.3.1 \
ZC_BUILDOUT=3.0.1 \
SETUPTOOLS=69.0.2 \
WHEEL=0.42.0 \
PLONE_MAJOR=6.0 \
PLONE_VERSION=6.0.9
# hadolint ignore=DL3008
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
gcc \
git \
libbz2-dev \
libc6-dev \
libffi-dev \
libjpeg62-dev \
libopenjp2-7-dev \
libmemcached-dev \
libpcre3-dev \
libpq-dev \
libreadline-dev \
libssl-dev \
libxml2-dev \
libxslt1-dev \
python3-dev \
python3-pip \
wget \
zlib1g-dev \
&& pip3 install --no-cache-dir pip==$PIP setuptools==$SETUPTOOLS zc.buildout==$ZC_BUILDOUT py-spy
WORKDIR /plone
# COPY --chown=imio eggs /plone/eggs/
# COPY --chown=imio --from=docker-staging.imio.be/smartweb/mutual:latest /plone/eggs/ /plone/eggs/
COPY --chown=imio *.cfg /plone/
COPY --chown=imio scripts /plone/scripts
COPY --chown=imio templates /plone/templates
RUN su -c "buildout -c prod.cfg -t 30 -N" -s /bin/sh imio
# clean up old eggs
# RUN for egg in `ls /plone/eggs/ | cut -d '-' -f 1 | uniq`; do rm -rfv `ls -td /plone/eggs/$egg-* | awk 'NR>1'`; done
FROM harbor.imio.be/common/plone-base:6.0.9-ubuntu
ENV PIP=23.3.1 \
ZC_BUILDOUT=3.0.1 \
SETUPTOOLS=69.0.2 \
WHEEL=0.42.0 \
PLONE_MAJOR=6.0 \
PLONE_VERSION=6.0.9 \
HOSTNAME_HOST=local \
PROJECT_ID=smartweb \
PLONE_EXTENSION_IDS=plone.app.caching:default,plonetheme.barceloneta:default,imio.smartweb.policy:default \
DEFAULT_LANGUAGE=fr
VOLUME /data/blobstorage
WORKDIR /plone
# hadolint ignore=DL3008
RUN apt-get update && apt-get install -y --no-install-recommends \
libjpeg62 \
libmemcached11 \
libopenjp2-7 \
libpq5 \
libtiff5 \
libxml2 \
libxslt1.1 \
lynx \
netcat \
poppler-utils \
python3-distutils \
rsync \
wget \
wv \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
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
COPY --from=builder /usr/local/bin/py-spy /usr/local/bin/py-spy
COPY --chown=imio --from=builder /plone .
COPY --from=builder /usr/local/lib/python3.10/dist-packages /usr/local/lib/python3.10/dist-packages
COPY --chown=imio docker-initialize.py docker-entrypoint.sh /
USER imio
EXPOSE 8080
HEALTHCHECK --interval=15s --timeout=10s --start-period=20s --retries=5 \
CMD wget -q http://127.0.0.1:8080/ok -O - | grep OK || exit 1
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["console"]