@@ -3,13 +3,15 @@ ARG APP_PREFIX=""
33ARG APP_SUFFIX=""
44ARG APP_UID=1000
55ARG APP_GID=1000
6+ ARG BUILD_ROOT=/git/fork-pykms-frontend
67
78# :: Build / styles
89 FROM alpine/git AS styles
910 ARG APP_NO_CACHE
11+ ARG BUILD_ROOT
1012 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} ;
1315
1416# :: Header
1517 FROM 11notes/kms:${APP_PREFIX}${APP_VERSION}${APP_SUFFIX}
@@ -23,6 +25,13 @@ ARG APP_GID=1000
2325 ARG APP_UID
2426 ARG APP_GID
2527 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
2635
2736 # :: environment
2837 ENV APP_IMAGE=${APP_IMAGE}
@@ -38,8 +47,6 @@ ARG APP_GID=1000
3847 ENV PORT=3000
3948 ENV LOG_LEVEL=INFO
4049
41- ENV PIP_ROOT_USER_ACTION=ignore
42-
4350 # :: multi-stage
4451 COPY ./LICENSE /opt/py-kms
4552
@@ -57,8 +64,8 @@ ARG APP_GID=1000
5764 cd /opt/py-kms; \
5865 echo "${APP_VERSION}" > VERSION; \
5966 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; \
6269 apk del --no-network .build; \
6370 rm -rf /usr/lib/python3.12/site-packages/pip;
6471
@@ -74,8 +81,8 @@ ARG APP_GID=1000
7481 rm -rf /opt/py-kms/templates; \
7582 rm -rf /opt/py-kms/static;
7683
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
7986
8087 # :: set correct permissions
8188 RUN set -ex; \
0 commit comments