-
-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Static binary : wrong PHP version #761
Comments
Could you try with the Docker cache disabled (add |
@dunglas Hi, Just tried with sudo docker buildx bake --load --set "*.platform=linux/amd64" --set static-builder.args.PHP_VERSION=8.2 --set static-builder.args.PHP_EXTENSIONS=imagick --set static-builder.args.PHP_EXTENSIONS_LIBS="" --set static-builder.args.CLEAN=1 --no-cache static-builder
sudo docker cp $(sudo docker create --name static-builder dunglas/frankenphp:static-builder):/go/src/app/dist/frankenphp-linux-$(uname -m) frankenphp ; sudo docker rm static-builder But the problem persists :/ |
Hi, I'm facing the same issue It seems to be related to this condition in the Line 76 in 323edef
When the static binary is build through docker, the Workaround -> Delete the
FROM dunglas/frankenphp:static-builder
ARG PHP_VERSION
ARG FRANKENPHP_VERSION
+ RUN rm -rf /go/src/app/dist/static-php-cli
# Prepare the app
WORKDIR /go/src/app/dist/app
COPY . .
RUN composer install --ignore-platform-reqs --no-dev -a
# Build the static binary
WORKDIR /go/src/app/
RUN EMBED=dist/app/ \
NO_COMPRESS=1 \
PHP_VERSION=${PHP_VERSION} \
FRANKENPHP_VERSION=${FRANKENPHP_VERSION} \
./build-static.sh
|
What happened?
I try to create a custom static binary with PHP 8.2 and imagick extension :
Binary is well created, but it's still in version 8.3 of PHP :
Also checked with phpinfo() and same result (and imagick is not installed).
What am I doing wrong ?
Build Type
Custom (tell us more in the description)
Worker Mode
No
Operating System
GNU/Linux
CPU Architecture
x86_64
PHP configuration
Relevant log output
No response
The text was updated successfully, but these errors were encountered: