Fix docker doctor fix pkgroot volume overwrite bug

This commit is contained in:
crazywhalecc
2025-09-04 12:03:13 +08:00
parent 38ec03fe30
commit a79564f685
5 changed files with 24 additions and 3 deletions

View File

@@ -3,7 +3,7 @@
set -e
# This file is using docker to run commands
SPC_DOCKER_VERSION=v5
SPC_DOCKER_VERSION=v6
# Detect docker can run
if ! which docker >/dev/null; then
@@ -122,6 +122,9 @@ ADD ./src /app/src
COPY ./composer.* /app/
ADD ./bin /app/bin
RUN composer install --no-dev
ADD ./config /app/config
RUN PKG_ROOT_PATH=/app/pkgroot-private bin/spc doctor --auto-fix
RUN PKG_ROOT_PATH=/app/pkgroot-private bin/spc install-pkg upx
EOF
fi

View File

@@ -3,7 +3,7 @@
set -e
# This file is using docker to run commands
SPC_DOCKER_VERSION=v5
SPC_DOCKER_VERSION=v6
# Detect docker can run
if ! which docker >/dev/null; then
@@ -112,7 +112,8 @@ ENV SPC_LIBC=glibc
ENV PATH="/app/bin:/cmake/bin:/opt/rh/devtoolset-10/root/usr/bin:\$PATH"
ADD ./config /app/config
RUN CC=gcc bin/spc doctor --auto-fix --debug
RUN CC=gcc PKG_ROOT_PATH=/app/pkgroot-private bin/spc doctor --auto-fix --debug
RUN PKG_ROOT_PATH=/app/pkgroot-private bin/spc install-pkg upx
RUN if [ -f /app/buildroot/bin/re2c ]; then \
cp /app/buildroot/bin/re2c /usr/local/bin/re2c ;\
fi