This commit is contained in:
26
.drone.yml
26
.drone.yml
@@ -6,7 +6,8 @@ clone:
|
|||||||
depth: 1
|
depth: 1
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build
|
# 8.1
|
||||||
|
- name: build-apache
|
||||||
pull: if-not-exists
|
pull: if-not-exists
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
@@ -17,7 +18,30 @@ steps:
|
|||||||
- "stark.doylee.cn/library/flarum"
|
- "stark.doylee.cn/library/flarum"
|
||||||
tags:
|
tags:
|
||||||
- ${DRONE_BUILD_NUMBER}
|
- ${DRONE_BUILD_NUMBER}
|
||||||
|
- 8.1-apache
|
||||||
|
- 8-apache
|
||||||
|
- apache
|
||||||
- latest
|
- 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
|
registry: stark.doylee.cn
|
||||||
mirror: https://p2t7g3ky.mirror.aliyuncs.com
|
mirror: https://p2t7g3ky.mirror.aliyuncs.com
|
||||||
when:
|
when:
|
||||||
|
|||||||
41
Dockerfile
41
Dockerfile
@@ -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
|
USER root
|
||||||
|
|||||||
Reference in New Issue
Block a user