Files
cunkebao_v3/Server/Dockerfile
Manus AI 5517457929 sync: 以本地为准同步全量变更至 GitHub
含四端需求文档、前端/后端/超管/触客宝迭代及部署脚本更新;未拉取远程。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-30 04:24:56 +08:00

52 lines
1.6 KiB
Docker

# 存客宝后端 - ThinkPHP 7.4 + Nginx + PHP-FPM
FROM php:7.4-fpm-alpine
RUN apk add --no-cache \
nginx \
supervisor \
git \
unzip \
curl \
libzip-dev \
libpng-dev \
libjpeg-turbo-dev \
freetype-dev \
oniguruma-dev \
icu-dev \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) \
pdo_mysql \
mysqli \
zip \
gd \
bcmath \
opcache \
intl \
mbstring \
&& apk add --no-cache --virtual .build-deps $PHPIZE_DEPS \
&& pecl install redis \
&& docker-php-ext-enable redis \
&& apk del .build-deps
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer
COPY docker/nginx.conf /etc/nginx/nginx.conf
COPY docker/default.conf /etc/nginx/http.d/default.conf
COPY docker/php.ini /usr/local/etc/php/php.ini
COPY docker/www.conf /usr/local/etc/php-fpm.d/www.conf
COPY docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
WORKDIR /var/www/html
COPY . .
RUN composer config --no-plugins allow-plugins.easywechat-composer/easywechat-composer true \
&& composer config --no-plugins allow-plugins.topthink/think-installer true \
&& composer install --no-dev --optimize-autoloader --no-interaction --no-security-blocking \
&& mkdir -p runtime/cache runtime/log runtime/temp \
/var/log/supervisor /var/run \
&& chmod -R 777 runtime \
&& chown -R www-data:www-data /var/www/html
EXPOSE 80
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]