Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
69 lines (59 loc) · 3.34 KB
/
Copy pathDockerfile
File metadata and controls
69 lines (59 loc) · 3.34 KB
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
# Copyright (c) 2017-2026 Alexander Todorov <atodorov@otb.bg>
#
# Licensed under GNU Affero General Public License v3 or later (AGPLv3+)
# https://www.gnu.org/licenses/agpl-3.0.html
# checkov:skip=CKV_DOCKER_2:Ensure that HEALTHCHECK instructions have been added to container images
ARG KIWI_VERSION=latest
FROM hub.kiwitcms.eu/kiwitcms/version:$KIWI_VERSION
USER 0
COPY ./etc/pki/rpm-gpg/* /etc/pki/rpm-gpg/
COPY ./etc/yum.repos.d/* /etc/yum.repos.d/
RUN microdnf -y --nodocs install augeas-libs fuse-libs psmisc restic util-linux-core xmlsec1 xmlsec1-openssl && \
rpm -Uhv --excludedocs https://s3.amazonaws.com/mountpoint-s3-release/latest/$(uname -m | sed s/aarch64/arm64/)/mount-s3.rpm && \
microdnf -y --nodocs update && \
microdnf clean all
HEALTHCHECK CMD [ -d /proc/$(cat /tmp/nginx.pid) ] && [ -d /proc/$(cat /tmp/kiwitcms.pid) ]
RUN useradd --uid 1001 --gid 0 --home-dir /Kiwi kiwitcms
USER 1001
# override NGINX configuration
CMD /Kiwi/bin/docker-entrypoint
COPY --chown=1001:root ./etc/nginx.override /Kiwi/etc/nginx.override
RUN ln -sf /tmp/actual.conf /Kiwi/etc/nginx.conf
ENV NGX_AUTHENTICATED_RATE=300 \
NGX_AUTHENTICATED_BURST=100 \
NGX_STATIC_RATE=300 \
NGX_STATIC_BURST=100 \
NGX_UPLOADS_RATE=10 \
NGX_UPLOADS_BURST=10 \
NGX_ERRORS_RATE=1 \
NGX_ERRORS_BURST=1 \
NGX_CSP_SCRIPT_SRC="" \
NGX_DENY_INCLUDE="/dev/null"
COPY --chown=1001:root ./bin/* /Kiwi/bin/
COPY --chown=1001:root ./dist/ /Kiwi/dist/
RUN --mount=type=secret,id=PKG_TOKEN,env=PKG_TOKEN \
pip install --no-cache-dir --only-binary :all: decorator lxml && \
pip install --no-cache-dir --find-links /Kiwi/dist/ \
--index-url https://$PKG_TOKEN@pkg.kiwitcms.eu/pypi/ \
--extra-index-url https://pypi.org/simple/ \
/Kiwi/dist/kiwitcms_enterprise*.whl
# workaround broken CSS which will break collectstatic
# because they refer to non-existing ../fonts/glyphicons-halflings-regular.eot (no fonts/ directory)
# remove django_tenants/templates/admin/index.html b/c it is ugly and b/c we use grapelli
RUN rm -rf /venv/lib64/python3.14/site-packages/tcms/node_modules/c3/htdocs/ \
/venv/lib64/python3.14/site-packages/tcms/node_modules/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker-standalone.css \
/venv/lib64/python3.14/site-packages/tcms/node_modules/bootstrap-touchspin/demo/ \
/venv/lib64/python3.14/site-packages/django_tenants/templates/admin/index.html
# create missing source-map files. Not critical for UI functionality, see:
# https://developer.mozilla.org/en-US/docs/Tools/Debugger/How_to/Use_a_source_map
RUN touch /venv/lib64/python3.14/site-packages/tcms/node_modules/bootstrap-slider/dependencies/js/jquery.min.map \
/venv/lib64/python3.14/site-packages/tcms/node_modules/pdfmake/build/browser-module.mjs.map \
/venv/lib64/python3.14/site-packages/tcms/node_modules/pdfmake/build/module.mjs.map \
/venv/lib64/python3.14/site-packages/tcms/node_modules/pdfmake/build/pdfkit.browser.mjs.map
# collect static files again
RUN cp /Kiwi/static/ca.crt /Kiwi/ssl/ && \
/Kiwi/manage.py collectstatic --clear --link --noinput && \
/Kiwi/manage.py generate_rpc_schema && \
mv /Kiwi/ssl/ca.crt /Kiwi/static/ && \
mkdir -p /Kiwi/static/.well-known/acme-challenge/ && \
mkdir -p /Kiwi/mnt/