Skip to content

Commit 0e5fc7e

Browse files
committed
Update to latest PHPDocker.io config.
1 parent 435b638 commit 0e5fc7e

File tree

6 files changed

+17
-83
lines changed

6 files changed

+17
-83
lines changed

docker-compose.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@
33
###############################################################################
44

55
services:
6-
webserver:
7-
image: 'nginx:alpine'
8-
working_dir: /app
9-
volumes:
10-
- '.:/app'
11-
- './phpdocker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf'
12-
ports:
13-
- '30000:80'
6+
# webserver:
7+
# image: 'nginx:alpine'
8+
# working_dir: /app
9+
# volumes:
10+
# - '.:/app'
11+
# - './phpdocker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf'
12+
# ports:
13+
# - '30000:80'
1414

1515
php-fpm:
1616
build: phpdocker/php-fpm
1717
working_dir: /app
18+
environment:
19+
PHP_IDE_CONFIG: "serverName=Docker"
1820
volumes:
1921
- '.:/app'
2022
- './phpdocker/php-fpm/php-ini-overrides.ini:/etc/php/8.4/fpm/conf.d/99-overrides.ini'
2123
- './phpdocker/php-fpm/php-ini-overrides.ini:/etc/php/8.4/cli/conf.d/99-overrides.ini'
22-
environment:
23-
PHP_IDE_CONFIG: "serverName=Docker"

phpdocker/README.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ <h2>Services exposed outside your environment</h2>
7575
<tbody>
7676
<tr>
7777
<td>Webserver</td>
78-
<td><a href="http://localhost:30000">localhost:30000</a></td>
78+
<td><a href="http://localhost:40000">localhost:40000</a></td>
7979
</tr>
8080
</tbody>
8181
</table>

phpdocker/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ add your own hostname on your `/etc/hosts`
3030

3131
Service|Address outside containers
3232
-------|--------------------------
33-
Webserver|[localhost:30000](http://localhost:30000)
33+
Webserver|[localhost:40000](http://localhost:40000)
3434

3535
## Hosts within your environment ##
3636

phpdocker/nginx/nginx.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ server {
66
access_log /var/log/nginx/application.access.log;
77

88
root /app/public;
9-
index index.html index.php;
9+
index index.php;
1010

1111
# try to serve file directly, fallback to index.php
1212
location / {

phpdocker/php-fpm/Dockerfile

Lines changed: 3 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,9 @@
1-
## Cloned and modified from phpdocker.io's 8.3 base image.
1+
FROM phpdockerio/php:8.4-fpm
2+
WORKDIR "/app"
23

3-
### CLI ###
4-
5-
FROM ubuntu:noble AS cli
6-
7-
# Fixes some weird terminal issues such as broken clear / CTRL+L
8-
ENV TERM=linux
9-
10-
# Ensure apt doesn't ask questions when installing stuff
11-
ENV DEBIAN_FRONTEND=noninteractive
12-
13-
# Install Ondrej repos for Ubuntu jammy, PHP, composer and selected extensions - better selection than
14-
# the distro's packages
154
RUN apt-get update \
16-
&& apt-get install -y --no-install-recommends gnupg \
17-
&& echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu jammy main" > /etc/apt/sources.list.d/ondrej-php.list \
18-
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C \
19-
&& apt-get update \
205
&& apt-get -y --no-install-recommends install \
21-
ca-certificates \
22-
curl \
23-
unzip \
24-
php8.4-cli \
25-
php8.4-curl \
26-
php8.4-mbstring \
27-
php8.4-opcache \
28-
php8.4-readline \
29-
php8.4-xml \
30-
php8.4-pdo \
31-
php8.4-pdo-sqlite \
32-
php8.4-dev \
33-
php-pear \
34-
make \
356
git \
36-
nano \
37-
&& apt-get clean \
38-
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* ~/.composer
39-
40-
#=== Install xdebug via PIE (PHP Extension Installer) ===
41-
#ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
42-
#RUN install-php-extensions xdebug/xdebug@master \
43-
# && docker-php-ext-enable xdebug
44-
45-
RUN pecl install xdebug-3.4.0
46-
47-
#RUN git clone https://github.com/xdebug/xdebug.git -b master xdebug \
48-
# && cd xdebug && git reset --hard 65f7f69f34 && rm -r .git
49-
50-
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
51-
52-
CMD ["php", "-a"]
53-
54-
# Git keeps whining if I don't do this.
55-
RUN git config --global --add safe.directory /app
56-
57-
### FPM ###
58-
59-
FROM cli AS fpm
60-
61-
# Install FPM
62-
RUN apt-get update \
63-
&& apt-get -y --no-install-recommends install php8.4-fpm \
7+
php8.4-xdebug \
648
&& apt-get clean \
659
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
66-
67-
STOPSIGNAL SIGQUIT
68-
69-
# PHP-FPM packages need a nudge to make them docker-friendly
70-
COPY overrides.conf /etc/php/8.4/fpm/pool.d/z-overrides.conf
71-
72-
CMD ["/usr/sbin/php-fpm8.4", "-O" ]
73-
74-
# Open up fcgi port
75-
EXPOSE 9000

phpdocker/php-fpm/php-ini-overrides.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ xdebug.client_port=9000
99
display_errors=On
1010
xdebug.idekey=Docker
1111

12-
zend_extension=/usr/lib/php/20240924/xdebug.so
12+
zend_extension=/usr/lib/php/20240924/xdebug.so

0 commit comments

Comments
 (0)