feat: 初步增加frankenphp构建二进制

This commit is contained in:
augushong
2025-08-09 21:58:18 +08:00
parent 4c79daf501
commit 7b5a84bcc3
5 changed files with 164 additions and 2548 deletions

View File

@@ -0,0 +1,20 @@
FROM dunglas/frankenphp:static-builder-gnu
# 设置代理
# ENV http_proxy http://192.168.0.106:1090
# ENV https_proxy http://192.168.0.106:1090
# # 如果你的内部网络不需要代理,可以设置 no_proxy
# ENV no_proxy localhost,127.0.0.1,dl.static-php.dev
RUN rm -rf /go/src/app/dist/static-php-cli
# 复制应用代码
WORKDIR /go/src/app/dist/app
COPY . .
# 构建静态二进制文件包含项目所需的所有PHP扩展
WORKDIR /go/src/app/
RUN EMBED=dist/app/ \
PHP_EXTENSIONS=ctype,curl,dom,fileinfo,filter,gd,iconv,json,libxml,mbstring,opcache,openssl,pdo,pdo_sqlite,simplexml,tokenizer,xml,xmlreader,xmlwriter,zip,zlib \
PHP_VERSION=8.2 \
./build-static.sh