mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-01 15:32:48 +08:00
修改默认的docker打包机制,更简洁;
This commit is contained in:
45
Dockerfile
45
Dockerfile
@@ -13,34 +13,21 @@ RUN apt-get install -y nginx
|
||||
# RUN apt-get install -y ffmpeg
|
||||
|
||||
# 安装redis
|
||||
RUN apt-get install -y redis-server
|
||||
# RUN apt-get install -y redis-server
|
||||
|
||||
# 安装PHP扩展 zip
|
||||
RUN apt-get install -y libzip-dev \
|
||||
&& docker-php-ext-install zip
|
||||
# 安装git
|
||||
# RUN apt-get install -y git
|
||||
|
||||
# 安装PHP扩展 mysql
|
||||
RUN docker-php-ext-install mysqli pdo_mysql
|
||||
ADD --chmod=0755 https://delivery.ulthon.com/install-php-extensions /usr/local/bin/
|
||||
|
||||
# 安装PHP扩展 exif
|
||||
RUN docker-php-ext-install exif
|
||||
|
||||
# 安装PHP扩展 imagemagick
|
||||
RUN apt-get install -y libmagickwand-dev \
|
||||
&& pecl install imagick \
|
||||
&& docker-php-ext-enable imagick
|
||||
|
||||
# 安装gd扩展
|
||||
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev \
|
||||
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
||||
&& docker-php-ext-install -j$(nproc) gd
|
||||
|
||||
# 安装PHP扩展 redis
|
||||
RUN pecl install redis \
|
||||
&& docker-php-ext-enable redis
|
||||
|
||||
# 安装PHP扩展 opcache
|
||||
RUN docker-php-ext-install opcache
|
||||
RUN install-php-extensions pdo_mysql
|
||||
RUN install-php-extensions gd
|
||||
RUN install-php-extensions fileinfo
|
||||
RUN install-php-extensions opcache
|
||||
RUN install-php-extensions redis
|
||||
RUN install-php-extensions event
|
||||
RUN install-php-extensions imagick
|
||||
RUN install-php-extensions zip
|
||||
|
||||
# 清理默认 Nginx 配置
|
||||
RUN rm /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default
|
||||
@@ -50,14 +37,8 @@ WORKDIR /var/www/html
|
||||
# 将当前目录下的文件拷贝到工作目录
|
||||
COPY . /var/www/html
|
||||
|
||||
# 安装git
|
||||
RUN apt-get install -y git
|
||||
|
||||
# 内部安装compsoer并安装依赖,如果不需要可以注释掉
|
||||
RUN apt install unzip
|
||||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||
ENV COMPOSER_ALLOW_SUPERUSER=1
|
||||
RUN composer install
|
||||
# RUN install-php-extensions @composer
|
||||
|
||||
# 创建runtime目录
|
||||
RUN mkdir -p /var/www/html/runtime
|
||||
|
||||
@@ -10,7 +10,7 @@ cp /var/www/html/docker/zz-phpfpm.conf /usr/local/etc/php-fpm.d
|
||||
|
||||
|
||||
# 运行redis
|
||||
nohup redis-server --requirepass "" &
|
||||
# nohup redis-server --requirepass "" &
|
||||
# 运行定时任务
|
||||
nohup php /var/www/html/think timer --local --quit &
|
||||
|
||||
|
||||
Reference in New Issue
Block a user