Skip to content

Commit bbe411f

Browse files
committed
fix
1 parent 0843895 commit bbe411f

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

Dockerfile

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,26 @@
1+
FROM composer:${COMPOSER_VERSION} AS composer
12
FROM php:8.3-cli-alpine
23

3-
# Install required packages
4+
ENV COMPOSER_ALLOW_SUPERUSER=1
5+
46
RUN apk add --no-cache \
57
wget \
68
git \
79
unzip \
810
upx \
911
bash \
10-
file \
11-
php-pcntl \
12-
php-tokenizer \
13-
php-dom \
14-
php-xml \
15-
php-phar
12+
file
1613

17-
# If the above doesn't work, try enabling the PCNTL extension directly:
18-
RUN docker-php-ext-install pcntl
14+
COPY --from=composer /usr/bin/composer /usr/bin/composer
1915

2016
# Set working directory
2117
WORKDIR /build-tools
2218

2319
# Clone and set up static-php-cli from source
24-
RUN git clone https://github.com/crazywhalecc/static-php-cli.git --depth=1 /build-tools/static-php-cli \
25-
&& cd /build-tools/static-php-cli \
26-
&& ./bin/setup-runtime
20+
RUN git clone https://github.com/crazywhalecc/static-php-cli.git
21+
RUN cd static-php-cli
22+
RUN composer install --no-dev --prefer-dist --ignore-platform-reqs
23+
RUN chmod +x bin/spc
2724

2825
# Download box tool for PHAR creation
2926
RUN wget -O /usr/local/bin/box "https://github.com/box-project/box/releases/download/4.6.6/box.phar" \

0 commit comments

Comments
 (0)