64
64
# Detect docker env is setup
65
65
if ! $DOCKER_EXECUTABLE images | grep -q cwcc-spc-gnu-$SPC_USE_ARCH -$SPC_DOCKER_VERSION ; then
66
66
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
68
68
FROM centos:7
69
69
RUN sed -i 's/mirror.centos.org/vault.centos.org/g' /etc/yum.repos.d/*.repo && \
70
70
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
96
96
tar -xzf patchelf.tgz -C /patchelf --strip-components=1 && \
97
97
cp /patchelf/bin/patchelf /usr/bin/
98
98
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 && \
100
100
mkdir /cmake && \
101
101
tar -xzf cmake.tgz -C /cmake --strip-components 1
102
102
@@ -107,8 +107,8 @@ ADD ./bin/setup-runtime /app/bin/setup-runtime
107
107
ADD ./bin/spc /app/bin/spc
108
108
RUN /app/bin/setup-runtime
109
109
RUN /app/bin/php /app/bin/composer install --no-dev
110
- ENV PATH="/app/bin:/cmake/bin:$PATH "
111
110
ENV SPC_LIBC=glibc
111
+ ENV PATH="/app/bin:/cmake/bin:/opt/rh/devtoolset-10/root/usr/bin:\$ PATH"
112
112
113
113
ADD ./config/env.ini /app/config/env.ini
114
114
RUN CC=gcc bin/spc doctor --auto-fix --debug
@@ -128,7 +128,6 @@ RUN curl -o automake.tgz -fsSL https://ftp.gnu.org/gnu/automake/automake-1.17.ta
128
128
make && \
129
129
make install && \
130
130
ln -sf /usr/local/bin/automake /usr/bin/automake
131
-
132
131
EOF
133
132
fi
134
133
@@ -154,11 +153,7 @@ if [ -f "$(pwd)/craft.yml" ]; then
154
153
fi
155
154
156
155
# 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
162
157
echo ' SPC_LIBC=glibc' >> /tmp/spc-gnu-docker.env
163
158
echo ' SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS_PROGRAM="-Wl,-O1 -pie"' >> /tmp/spc-gnu-docker.env
164
159
echo ' SPC_CMD_VAR_PHP_MAKE_EXTRA_LIBS="-ldl -lpthread -lm -lresolv -lutil -lrt"' >> /tmp/spc-gnu-docker.env
0 commit comments