Skip to content

Commit 8145a75

Browse files
committed
Fix spc-gnu-docker path
1 parent e41d789 commit 8145a75

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

bin/spc-gnu-docker

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ fi
6464
# Detect docker env is setup
6565
if ! $DOCKER_EXECUTABLE images | grep -q cwcc-spc-gnu-$SPC_USE_ARCH-$SPC_DOCKER_VERSION; then
6666
echo "Docker container does not exist. Building docker image ..."
67-
$DOCKER_EXECUTABLE buildx build $PLATFORM_ARG --no-cache -t cwcc-spc-gnu-$SPC_USE_ARCH-$SPC_DOCKER_VERSION -f- . <<EOF
67+
$DOCKER_EXECUTABLE buildx build $PLATFORM_ARG -t cwcc-spc-gnu-$SPC_USE_ARCH-$SPC_DOCKER_VERSION -f- . <<EOF
6868
FROM centos:7
6969
RUN sed -i 's/mirror.centos.org/vault.centos.org/g' /etc/yum.repos.d/*.repo && \
7070
sed -i 's/^#.*baseurl=http/baseurl=http/g' /etc/yum.repos.d/*.repo && \
@@ -96,7 +96,7 @@ RUN curl -fsSL -o patchelf.tgz https://github.com/NixOS/patchelf/releases/downlo
9696
tar -xzf patchelf.tgz -C /patchelf --strip-components=1 && \
9797
cp /patchelf/bin/patchelf /usr/bin/
9898
99-
RUN curl -o cmake.tgz -fsSL https://github.com/Kitware/CMake/releases/download/v3.31.4/cmake-3.31.4-linux-$SPC_USE_ARCH.tar.gz && \
99+
RUN curl -o cmake.tgz -#fSL https://github.com/Kitware/CMake/releases/download/v3.31.4/cmake-3.31.4-linux-$SPC_USE_ARCH.tar.gz && \
100100
mkdir /cmake && \
101101
tar -xzf cmake.tgz -C /cmake --strip-components 1
102102
@@ -107,11 +107,11 @@ ADD ./bin/setup-runtime /app/bin/setup-runtime
107107
ADD ./bin/spc /app/bin/spc
108108
RUN /app/bin/setup-runtime
109109
RUN /app/bin/php /app/bin/composer install --no-dev
110-
ENV PATH="/app/bin:/cmake/bin:$PATH"
111110
ENV SPC_TARGET=glibc
111+
ENV PATH="/app/bin:/cmake/bin:/opt/rh/devtoolset-10/root/usr/bin:\$PATH"
112112
113113
ADD ./config/env.ini /app/config/env.ini
114-
RUN CC=gcc bin/spc doctor --auto-fix --debug
114+
RUN CC=gcc bin/php bin/spc doctor --auto-fix --debug
115115
116116
RUN curl -o make.tgz -fsSL https://ftp.gnu.org/gnu/make/make-4.4.tar.gz && \
117117
tar -zxvf make.tgz && \
@@ -128,7 +128,6 @@ RUN curl -o automake.tgz -fsSL https://ftp.gnu.org/gnu/automake/automake-1.17.ta
128128
make && \
129129
make install && \
130130
ln -sf /usr/local/bin/automake /usr/bin/automake
131-
132131
EOF
133132
fi
134133

@@ -154,11 +153,7 @@ if [ -f "$(pwd)/craft.yml" ]; then
154153
fi
155154

156155
# Apply env in temp env file
157-
echo 'CC=/opt/rh/devtoolset-10/root/usr/bin/gcc' > /tmp/spc-gnu-docker.env
158-
echo 'CXX=/opt/rh/devtoolset-10/root/usr/bin/g++' >> /tmp/spc-gnu-docker.env
159-
echo 'AR=/opt/rh/devtoolset-10/root/usr/bin/ar' >> /tmp/spc-gnu-docker.env
160-
echo 'LD=/opt/rh/devtoolset-10/root/usr/bin/ld' >> /tmp/spc-gnu-docker.env
161-
echo 'SPC_DEFAULT_C_FLAGS=-fPIC' >> /tmp/spc-gnu-docker.env
156+
echo 'SPC_DEFAULT_C_FLAGS=-fPIC' > /tmp/spc-gnu-docker.env
162157
echo 'SPC_TARGET=glibc' >> /tmp/spc-gnu-docker.env
163158
echo 'SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS_PROGRAM="-Wl,-O1 -pie"' >> /tmp/spc-gnu-docker.env
164159
echo 'SPC_CMD_VAR_PHP_MAKE_EXTRA_LIBS="-ldl -lpthread -lm -lresolv -lutil -lrt"' >> /tmp/spc-gnu-docker.env
@@ -192,5 +187,5 @@ if [ "$SPC_DOCKER_DEBUG" = "yes" ]; then
192187
set -ex
193188
$DOCKER_EXECUTABLE run $PLATFORM_ARG --privileged --rm -it $INTERACT $ENV_LIST --env-file /tmp/spc-gnu-docker.env $MOUNT_LIST cwcc-spc-gnu-$SPC_USE_ARCH-$SPC_DOCKER_VERSION /bin/bash
194189
else
195-
$DOCKER_EXECUTABLE run $PLATFORM_ARG --rm $INTERACT $ENV_LIST --env-file /tmp/spc-gnu-docker.env $MOUNT_LIST cwcc-spc-gnu-$SPC_USE_ARCH-$SPC_DOCKER_VERSION bin/spc $@
190+
$DOCKER_EXECUTABLE run $PLATFORM_ARG --rm $INTERACT $ENV_LIST --env-file /tmp/spc-gnu-docker.env $MOUNT_LIST cwcc-spc-gnu-$SPC_USE_ARCH-$SPC_DOCKER_VERSION /app/bin/php bin/spc $@
196191
fi

0 commit comments

Comments
 (0)