File tree Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change 1+ FROM composer:${COMPOSER_VERSION} AS composer
12FROM php:8.3-cli-alpine
23
3- # Install required packages
4+ ENV COMPOSER_ALLOW_SUPERUSER=1
5+
46RUN 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
2117WORKDIR /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
2926RUN wget -O /usr/local/bin/box "https://github.com/box-project/box/releases/download/4.6.6/box.phar" \
You can’t perform that action at this time.
0 commit comments