将7.3/latest版本拆除默认 Dockerfile
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
40
latest/Dockerfile
Normal file
40
latest/Dockerfile
Normal file
@@ -0,0 +1,40 @@
|
||||
FROM php:apache as apache-latest
|
||||
|
||||
# 系统基础配置
|
||||
USER root
|
||||
WORKDIR /var/www
|
||||
|
||||
ENV LC_ALL C.UTF-8
|
||||
ENV LANG C.UTF-8
|
||||
|
||||
RUN sed -i 's/\(security\|deb\).debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list \
|
||||
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
||||
&& apt update \
|
||||
&& apt dist-upgrade -y \
|
||||
&& apt autoremove -y \
|
||||
&& apt autoclean -y
|
||||
|
||||
# apache 基本配置
|
||||
RUN sed -ri -e 's!/var/www/html!/var/www/public!g' /etc/apache2/sites-available/*.conf \
|
||||
&& echo 'ServerName localhost' >> /etc/apache2/apache2.conf \
|
||||
&& chown -R www-data:www-data /var/www \
|
||||
&& a2enmod rewrite
|
||||
|
||||
# gd pdo_mysql zip gmp
|
||||
RUN apt install -y \
|
||||
libzip-dev \
|
||||
zip \
|
||||
unzip \
|
||||
libpng-dev \
|
||||
zlib1g-dev \
|
||||
libgmp-dev \
|
||||
&& docker-php-ext-configure gd \
|
||||
&& docker-php-ext-install -j$(nproc) gd \
|
||||
&& docker-php-ext-install pdo_mysql \
|
||||
&& docker-php-ext-install zip \
|
||||
&& docker-php-source delete \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# php 环境配置
|
||||
COPY --from=composer /usr/bin/composer /usr/bin/composer
|
||||
|
||||
Reference in New Issue
Block a user