企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
## docker安装php+supervisor #### Dockerfile ``` FROM php:7.4-fpm RUN sed -i 's/http:\/\/deb.debian.org/https:\/\/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list && \ apt-get update && apt-get install -y git && apt-get install -y supervisor COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/ RUN install-php-extensions opcache pcntl redis gd mysqli zip @composer-2.0.2 #空格写需要安装的扩展名就行 其中还支持composer的安装 EXPOSE 9000 9001 CMD supervisord -c /etc/supervisor/supervisord.conf && php-fpm ``` #### dcoker-compose.yml ``` version: '3' services: php: restart: always container_name: php-fpm image: php8.2-fpm build: context: . dockerfile: Dockerfile volumes: - ./app:/var/www/html - ./log:/var/log/php - ./conf:/usr/local/etc - ./supervisor/conf.d:/etc/supervisor/conf.d environment: - TZ=Asia/Shanghai cap_add: - SYS_PTRACE networks: default: external: true name: my_net ```