@@ -3,13 +3,15 @@ ARG APP_PREFIX=""
3
3
ARG APP_SUFFIX=""
4
4
ARG APP_UID=1000
5
5
ARG APP_GID=1000
6
+ ARG BUILD_ROOT=/git/fork-pykms-frontend
6
7
7
8
# :: Build / styles
8
9
FROM alpine/git AS styles
9
10
ARG APP_NO_CACHE
11
+ ARG BUILD_ROOT
10
12
RUN set -ex; \
11
- git clone https://github.com/11notes/pykms-frontend.git; \
12
- cd /git/pykms-frontend ;
13
+ git clone https://github.com/11notes/fork- pykms-frontend.git; \
14
+ cd ${BUILD_ROOT} ;
13
15
14
16
# :: Header
15
17
FROM 11notes/kms:${APP_PREFIX}${APP_VERSION}${APP_SUFFIX}
@@ -23,6 +25,13 @@ ARG APP_GID=1000
23
25
ARG APP_UID
24
26
ARG APP_GID
25
27
ARG APP_NO_CACHE
28
+ ARG BUILD_ROOT
29
+
30
+ # :: python image
31
+ ARG PIP_ROOT_USER_ACTION=ignore
32
+ ARG PIP_BREAK_SYSTEM_PACKAGES=1
33
+ ARG PIP_DISABLE_PIP_VERSION_CHECK=1
34
+ ARG PIP_NO_CACHE_DIR=1
26
35
27
36
# :: environment
28
37
ENV APP_IMAGE=${APP_IMAGE}
@@ -38,8 +47,6 @@ ARG APP_GID=1000
38
47
ENV PORT=3000
39
48
ENV LOG_LEVEL=INFO
40
49
41
- ENV PIP_ROOT_USER_ACTION=ignore
42
-
43
50
# :: multi-stage
44
51
COPY ./LICENSE /opt/py-kms
45
52
@@ -57,8 +64,8 @@ ARG APP_GID=1000
57
64
cd /opt/py-kms; \
58
65
echo "${APP_VERSION}" > VERSION; \
59
66
echo "master" >> VERSION; \
60
- pip3 install --no-cache-dir --break-system-packages - r /opt/py-kms/requirements.gui.txt; \
61
- pip3 list -o | sed 's/pip.*//' | grep . | cut -f1 -d' ' | tr " " "\n " | awk '{if(NR>=3)print}' | cut -d' ' -f1 | xargs -n1 pip3 install --no-cache-dir --break-system-packages - U; \
67
+ pip3 install -r /opt/py-kms/requirements.gui.txt; \
68
+ pip3 list -o | sed 's/pip.*//' | grep . | cut -f1 -d' ' | tr " " "\n " | awk '{if(NR>=3)print}' | cut -d' ' -f1 | xargs -n1 pip3 install -U; \
62
69
apk del --no-network .build; \
63
70
rm -rf /usr/lib/python3.12/site-packages/pip;
64
71
@@ -74,8 +81,8 @@ ARG APP_GID=1000
74
81
rm -rf /opt/py-kms/templates; \
75
82
rm -rf /opt/py-kms/static;
76
83
77
- COPY --from=styles /git/pykms-frontend /templates ${APP_ROOT}/styles/custom-icon/templates
78
- COPY --from=styles /git/pykms-frontend /static ${APP_ROOT}/styles/custom-icon/static
84
+ COPY --from=styles ${BUILD_ROOT} /templates ${APP_ROOT}/styles/custom-icon/templates
85
+ COPY --from=styles ${BUILD_ROOT} /static ${APP_ROOT}/styles/custom-icon/static
79
86
80
87
# :: set correct permissions
81
88
RUN set -ex; \
0 commit comments