Files
ulthon_admin/extend/ua/build/static-build.Dockerfile
2025-08-09 21:58:18 +08:00

20 lines
694 B
Docker
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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