Files
tbox-gateway-docker/Dockerfile
T
Antigravity 2292eb6e1e feat: 初始化 tbox-gateway 镜像构建配置及 Gitea 自动构建工作流
- 编写 Dockerfile 基础镜像及依赖扩展安装配置
- 配置 Gitea Actions 自动构建与推送镜像至容器仓库 (.gitea/workflows/docker-build.yml)
- 增加 .gitignore 与使用说明文档
2026-10-22 13:32:46 +08:00

75 lines
2.3 KiB
Docker

# 2026-10-21 PHP2Shell 漏洞 (CVE-2026-109618 / CVE-2026-109619, CVSS 9.2) 紧急升级:
# 7.4 已 EOL 无官方修复版本, 升级至已修复的 8.3.36 (修复版本: 8.5.12 / 8.4.27 / 8.3.36 / 8.2.35)
FROM php:8.3.36-cli-alpine
# FROM php:8.1.24-cli
# FROM php:8.2.17-cli-alpine
# FROM php:8.3.4-cli-alpine
# FROM php:7.4.33-cli-alpine
# Container package : mirrors.163.com、mirrors.aliyun.com、mirrors.ustc.edu.cn
RUN sed -i "s/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g" /etc/apk/repositories
# RUN sed -i "s/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g" /etc/apk/repositories
RUN apk update
RUN apk add curl
RUN apk add git
RUN apk add supervisor
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
#COPY config/install-php-extensions /usr/local/bin/install-php-extensions
RUN chmod +x /usr/local/bin/install-php-extensions
RUN install-php-extensions bcmath
RUN install-php-extensions pdo
RUN install-php-extensions mysqli
RUN install-php-extensions pdo_mysql
RUN install-php-extensions redis
RUN install-php-extensions bz2
RUN install-php-extensions calendar
RUN install-php-extensions opcache
RUN install-php-extensions pcntl
RUN install-php-extensions sockets
RUN install-php-extensions event
RUN install-php-extensions pdo_pgsql
RUN install-php-extensions pgsql
RUN install-php-extensions zip
RUN install-php-extensions gd
RUN install-php-extensions gmp
#RUN install-php-extensions xdebug
RUN php -m
# Add Composer
RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer
# Configure PHP
#COPY config/php.ini /usr/local/etc/php/conf.d/zzz_custom.ini
# Make sure files/folders needed by the processes are accessable when they run under the nobody user
RUN chown -R nobody.nobody /run
# Setup document root
RUN mkdir -p /app
# Make the document root a volume
VOLUME /app
#echo " > /usr/local/etc/php/conf.d/phalcon.ini
# Switch to use a non-root user from here on
USER root
# Add application
WORKDIR /app
# Expose the port nginx is reachable on
EXPOSE 8787
#COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Let supervisord start nginx & php
#CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
CMD ["php", "/app/start.php","start"]