-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
56 lines (45 loc) · 1.8 KB
/
Dockerfile
File metadata and controls
56 lines (45 loc) · 1.8 KB
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
#
# Edoceo Caddy+PHP+Xdebug
#
FROM debian:12-slim
ARG DEBIAN_FRONTEND=noninteractive
# Update System
RUN apt-get update
RUN apt-get install --quiet --quiet --yes apt-transport-https curl debian-archive-keyring debian-keyring \
&& curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' \
| gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg \
&& curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' \
| tee /etc/apt/sources.list.d/caddy-stable.list \
&& apt update
# Install Packages
RUN apt-get --quiet --quiet --yes update \
&& apt-get --quiet --quiet --yes upgrade \
&& apt-get --quiet --quiet --yes install php-cli php-bcmath php-curl php-gd php-mbstring php-pear php-pgsql php-redis php-sqlite3 php-ssh2 php-xml php-yaml php-zip \
&& apt-get --quiet --quiet --yes install php-fpm \
&& apt-get --quiet --quiet --yes install php-xdebug \
&& apt-get --quiet --quiet --yes install caddy \
&& phpenmod xdebug
#
# Network
EXPOSE 80
# COPY ./sysroot/apache2.conf /etc/apache2/apache2.conf
COPY ./sysroot/init.sh /init.sh
COPY ./sysroot/php.ini /etc/php/8.2/php.ini
COPY ./sysroot/xdebug.ini /etc/php/8.2/mods-available/xdebug.ini
COPY ./sysroot/Caddyfile /etc/caddy/Caddyfile
# COPY ./webroot/index.php /var/www/html/index.php
# COPY ./webroot/xdebug.php /var/www/html/xdebug.php
# COPY ./webroot/robots.txt /var/www/html/robots.txt
# COPY ./webroot/error.php /var/www/html/error.php
#
# Environment
ENV CADDY_SERVER_NAME="localhost"
ENV CADDY_SERVER_ROOT="/app/webroot"
ENV CADDY_LISTEN_PORT="*:80"
ENV XDEBUG_CLIENT_PORT="9003"
# Something here to start PHP-FPM?
# RUN php bin/console cache:warmup
# RUN /etc/init.d/php8.2-fpm start
# ENTRYPOINT [ "/usr/sbin/apache2", "-DFOREGROUND" ]
# CMD [ "caddy", "run", "--config", "/etc/caddy/Caddyfile" ]
ENTRYPOINT [ "/init.sh" ]