-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile
54 lines (48 loc) · 1.49 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
FROM php:8.3-alpine
# Image information
ARG VCS_REF
ARG BUILD_DATE
ARG BUILD_VERSION
ARG VERSION
ARG INSTALL_XDEBUG=false
LABEL maintainer="Davi Marcondes Moreira <davi.marcondes.moreira@gmail.com>" \
org.label-schema.name="DevDrops/PHP-Toolbox" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.build-date=$BUILD_DATE \
org.label-schema.vcs-url="https://github.com/devdrops/php-toolbox" \
org.label-schema.schema-version="1.0" \
org.label-schema.build-version=$BUILD_VERSION \
org.label-schema.project-version=$VERSION
# Ports exposed for built-in server
EXPOSE 8000/tcp
EXPOSE 8080/tcp
EXPOSE 8081/tcp
# Helper files
COPY ./helpers/ /config/
# Config and/or required files for PHP
COPY ./config-files/opcache/opcache.ini "${PHP_INI_DIR}/conf.d/docker-php-ext-opcache.ini"
COPY ./config-files/php/php.ini "${PHP_INI_DIR}/conf.d/app.ini"
# Configuration files
COPY ./config-files/ /config/
# PHP OPcache disable by default
ENV PHP_OPCACHE_VALIDATE_TIMESTAMPS="0"
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
# Installation:
# - Alpine requirements
# - PHP extensions
# - Composer
# - Composer configuration
# - Composer tools
# - Swoole
# - Redis
# - Xdebug (optional)
RUN <<EOF
sh /config/alpine/dependencies.sh
sh /config/php/extensions.sh
sh /config/composer/install.sh
sh /config/composer/config.sh
sh /config/composer/install-tools.sh
sh /config/swoole/install.sh
sh /config/redis/install.sh
if [ "$INSTALL_XDEBUG" = "true" ]; then sh /config/xdebug/install.sh ; fi
EOF