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
1
2
FROM php:8.3-cli-alpine
2
3
3
- # Install required packages
4
+ ENV COMPOSER_ALLOW_SUPERUSER=1
5
+
4
6
RUN apk add --no-cache \
5
7
wget \
6
8
git \
7
9
unzip \
8
10
upx \
9
11
bash \
10
- file \
11
- php-pcntl \
12
- php-tokenizer \
13
- php-dom \
14
- php-xml \
15
- php-phar
12
+ file
16
13
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
19
15
20
16
# Set working directory
21
17
WORKDIR /build-tools
22
18
23
19
# 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
27
24
28
25
# Download box tool for PHAR creation
29
26
RUN 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