This repository has been archived by the owner on Oct 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
71 lines (51 loc) · 1.76 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
ARG PHP_VERSION=8.3
FROM php:${PHP_VERSION}-apache
ARG PHP_VERSION
ARG XDEBUG_EXTENSION=xdebug-^3.3
ARG XDEBUG_CONFIG_FILE=config/xdebug3.ini
ARG PHP_EXTENSIONS=bcmath-stable,gd-stable,intl-stable,pcntl-stable,pdo_mysql-stable,pdo_pgsql-stable,zip-stable
ARG PHP_EXTENSIONS_ADD
ARG PHPUNIT_VERSIONS=8,9,10
ARG USE_ARCHIVE
ARG DEV_USER_UID=1000
ENV TERM=xterm-256color
RUN if [ "${USE_ARCHIVE}" -eq "1" ]; then sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list; fi
RUN if [ "${USE_ARCHIVE}" -eq "1" ]; then sed -i 's|security.debian.org|archive.debian.org/|g' /etc/apt/sources.list; fi
RUN if [ "${USE_ARCHIVE}" -eq "1" ]; then sed -i '/stretch-updates/d' /etc/apt/sources.list; fi
RUN apt-get update && \
apt-get upgrade -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
bc \
cron \
curl \
git \
htop \
jq \
nano \
openssh-client \
screen \
ssl-cert \
sudo \
unzip \
wget
RUN /usr/sbin/update-ca-certificates
ADD rootfs /
RUN (bash /setup/00-user.sh) && \
(bash /setup/10-bash.sh) && \
(bash /setup/20-apache.sh) && \
(bash /setup/30-php.sh $(echo ${PHP_EXTENSIONS} | tr "," " ") $(echo ${PHP_EXTENSIONS_ADD} | tr "," " ") ${XDEBUG_EXTENSION})
RUN (bash /setup/50-composer.sh) && \
(bash /setup/60-symfony-cli.sh) && \
(bash /setup/70-phpunit.sh $(echo ${PHPUNIT_VERSIONS} | tr "," " ")) && \
(bash /setup/90-utils.sh) && \
(rm -fr /setup/)
RUN rm -rf /var/lib/apt/lists/*
ADD ${XDEBUG_CONFIG_FILE} /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
USER dev
VOLUME /www
WORKDIR /www/localhost/public
HEALTHCHECK --interval=30s --timeout=3s \
CMD curl -f http://localhost/ || exit 1
EXPOSE 80
EXPOSE 443
CMD ["sudo", "apache2-foreground"]