FROM alpine:3.15.0
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories && \
apk update && \
apk add --no-cache lighttpd php8-fpm php8-sqlite3 php8-pdo php8-pdo_sqlite php8-json \
php8-mysqli php8-pdo_mysql php8-dom php8-mbstring php8-gd php8-curl php8-session && \
echo 'include "mod_fastcgi_fpm.conf"' >> /etc/lighttpd/lighttpd.conf
EXPOSE 80/tcp
CMD php-fpm8 && lighttpd -D -f /etc/lighttpd/lighttpd.conf
VOLUME /var/www/localhost/htdocs
- 当版本更新时,修改Alpine和PHP的版本号即可
- 如果不在国内,可以不用修改源,或者可以使用更快的源
- 可根据需要自行增删PHP扩展
评论已关闭