1 Star 0 Fork 88

李贵明/wizard

forked from mylxsw/wizard 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 1.80 KB
一键复制 编辑 原始数据 按行查看 历史
mylxsw_osc 提交于 2022-08-29 13:36 . update composer to v2
FROM php:7.3-apache
WORKDIR /webroot
ENV APACHE_DOCUMENT_ROOT /webroot/public
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
RUN echo "memory_limit=-1" > "$PHP_INI_DIR/conf.d/memory-limit.ini" \
&& echo "date.timezone=${PHP_TIMEZONE:-UTC}" > "$PHP_INI_DIR/conf.d/date_timezone.ini" \
&& echo "upload_max_filesize = 100M\npost_max_size = 0" > "$PHP_INI_DIR/conf.d/upload-limit.ini"
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng-dev \
libzip-dev \
libldap-dev \
wget \
curl \
git \
subversion \
zip \
unzip \
mercurial \
--no-install-recommends && rm -r /var/lib/apt/lists/* \
&& docker-php-ext-install -j$(nproc) pcntl exif pdo_mysql zip ldap \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install -j$(nproc) gd
RUN wget https://mirrors.aliyun.com/composer/composer.phar \
&& mv composer.phar /usr/bin/composer.phar \
&& chmod +x /usr/bin/composer.phar \
&& ln -s /usr/bin/composer.phar /usr/bin/composer \
&& php /usr/bin/composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
RUN a2enmod rewrite
RUN a2enmod headers
COPY ./composer.json /webroot/
RUN php /usr/bin/composer install --prefer-dist --no-autoloader --no-scripts --no-dev
COPY ./ /webroot
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
RUN cp .env.docker .env \
&& php /usr/bin/composer dump-autoload --optimize \
&& chown www-data:www-data -R ./ \
&& php artisan storage:link
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/li_gui_ming/wizard.git
[email protected]:li_gui_ming/wizard.git
li_gui_ming
wizard
wizard
master

搜索帮助