添加了7.3版本的支持
Some checks failed
continuous-integration/drone/push Build was killed

This commit is contained in:
李东云
2022-04-09 02:59:13 +08:00
parent 93281c9322
commit ebdf4cba86
2 changed files with 65 additions and 2 deletions

View File

@@ -6,7 +6,8 @@ clone:
depth: 1
steps:
- name: build
# 8.1
- name: build-apache
pull: if-not-exists
image: plugins/docker
settings:
@@ -17,7 +18,30 @@ steps:
- "stark.doylee.cn/library/flarum"
tags:
- ${DRONE_BUILD_NUMBER}
- 8.1-apache
- 8-apache
- apache
- latest
target: apache-latest
registry: stark.doylee.cn
mirror: https://p2t7g3ky.mirror.aliyuncs.com
when:
event: push
# 7.3
- name: build-7.3-apache
pull: if-not-exists
image: plugins/docker
settings:
username: robot$library+drone
password: DhmbcQyu7I5uaUfWbzcedbDGB0gfhuFR
repo: stark.doylee.cn/library/flarum
cache_from:
- "stark.doylee.cn/library/flarum:7.3-apache"
tags:
- ${DRONE_BUILD_NUMBER}
- 7.3-apache
target: apache-73
registry: stark.doylee.cn
mirror: https://p2t7g3ky.mirror.aliyuncs.com
when:

View File

@@ -1,4 +1,43 @@
FROM php:apache as latest-apache
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
RUN apt install -y \
libzip-dev \
zip \
unzip \
libpng-dev \
zlib1g-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
FROM php:7.3-apache as apache-73
# 系统基础配置
USER root