-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdockerfile
More file actions
78 lines (52 loc) · 1.65 KB
/
dockerfile
File metadata and controls
78 lines (52 loc) · 1.65 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
70
71
72
73
74
75
76
77
78
ARG ALPINE_VERSION=3.23
ARG PYTHON_VERSION=3.11
FROM python:${PYTHON_VERSION}-alpine${ALPINE_VERSION} AS build
# RUN apk add --update \
# git;
# # gcc \
# # cmake \
# # libc-dev \
# # alpine-sdk \
# # libffi-dev \
# # build-base;
COPY requirements.txt /tmp/requirements.txt
COPY /website-template /website-template
RUN mkdir -p /tmp/python_modules /tmp/python_builds
RUN pip install --upgrade \
setuptools \
wheel \
setuptools-rust \
build \
twine; \
cd /tmp/python_modules; \
cat /tmp/requirements.txt; \
pip download --dest . --check-build-dependencies \
-r /tmp/requirements.txt; \
python -m build -w -o . /website-template/custom-plugins/*;
RUN cd /tmp/python_modules; \
ls -la /tmp/python_modules; \
pip wheel --wheel-dir /tmp/python_builds --find-links . *.whl; \
pip wheel --wheel-dir /tmp/python_builds --find-links . *.tar.gz || true; \
ls -la /tmp/python_builds
FROM python:${PYTHON_VERSION}-alpine${ALPINE_VERSION}
ENV MKDOCS_SRC_DIRECTORY='docs'
COPY --from=build /tmp/python_builds /tmp/python_builds
COPY includes/ /
RUN apk update --no-cache; \
apk upgrade --no-cache; \
apk add --no-cache \
bash \
envsubst \
git \
npm \
yq; \
pip install --no-cache-dir /tmp/python_builds/*.*; \
rm -rf /tmp/python_builds; \
chmod +x /entrypoint.sh; \
npm install \
markdownlint-cli2@v0.18.1 \
markdownlint-cli2-formatter-junit \
markdownlint-cli2-formatter-template \
--global;
RUN git config --global --add safe.directory '*'
ENTRYPOINT ["/entrypoint.sh"]