更新 Dockerfile
This commit is contained in:
parent
dddc63c97d
commit
d3d74c411b
25
Dockerfile
25
Dockerfile
@ -1,7 +1,17 @@
|
||||
# 使用官方PHP 8.1 FPM镜像作为基础镜像
|
||||
FROM php:8.1-fpm
|
||||
|
||||
# 安装系统依赖和 PHP 扩展
|
||||
RUN apt-get update && apt-get install -y git libzip-dev zip && docker-php-ext-install pdo_mysql bcmath zip
|
||||
RUN apt-get update && apt-get install -y \
|
||||
git \
|
||||
libzip-dev \
|
||||
zip \
|
||||
&& docker-php-ext-install \
|
||||
pdo_mysql \
|
||||
bcmath \
|
||||
zip \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# 安装 Composer
|
||||
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
||||
@ -15,11 +25,14 @@ RUN git clone -b dev https://github.com/Anankke/SSPanel-Uim.git sspanel && \
|
||||
git config core.filemode false && \
|
||||
composer install --no-dev --optimize-autoloader
|
||||
|
||||
# 复制启动脚本到容器
|
||||
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
|
||||
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
||||
|
||||
# 设置权限
|
||||
RUN chown -R www-data:www-data /var/www/sspanel
|
||||
|
||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||
# 暴露端口
|
||||
EXPOSE 9000
|
||||
|
||||
# 设置容器启动时执行的命令
|
||||
CMD ["php-fpm"]
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user