Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to create the PID file (/run/php/php8.1-fpm.pid).: Permission denied (13) (with custom Dockerfile/webimage_extra_packages) #6131

Closed
1 task done
Clemchan33 opened this issue Apr 26, 2024 · 21 comments

Comments

@Clemchan33
Copy link

Clemchan33 commented Apr 26, 2024

TL;DR:

If you have the "permission denied" on /run/php or related errors, and have a custom Dockerfile,

Add this to the end of your custom .ddev/web-build/Dockerfile:

RUN chmod 777 /run/php

Is there an existing issue for this?

  • I have searched the existing issues

Output of ddev debug test

Expand `ddev debug test` diagnostic information
Running bash [-c /tmp/test_ddev.sh /tmp/ddev-debug-test.txt]
Resulting output will be written to:
/tmp/ddev-debug-test.txt
file:///tmp/ddev-debug-test.txt
Please provide the file for support in Discord or the issue queue.
OK to stop running projects? This does no harm, and they will be restarted [Y/n] (yes): yes
Doing ddev poweroff but will restart projects at completion
 Container ddev-toto-web  Stopped
 Container ddev-toto-web  Removed
 Container ddev-toto-phpmyadmin  Stopped
 Container ddev-toto-phpmyadmin  Removed
 Container ddev-toto-db  Stopped
 Container ddev-toto-db  Removed
 Network ddev-toto_default  Removed
Project toto has been stopped.
The ddev-ssh-agent container has been removed. When you start it again you will have to use 'ddev auth ssh' to provide key authentication again.
Network ddev_default removed


======== Output file will be in /tmp/ddev-debug-test.txt ========


======== Existing project config ========
ddev installation alternate locations:
/usr/bin/ddev
/bin/ddev

These config files were loaded for project toto: [/home/cbrun/Docker/toto9/.ddev/config.yaml]
name: toto
type: drupal9
php_version: 8.1
webserver_type: apache-fpm
webimage: ddev/ddev-webserver:v1.23.0-1
router_http_port: 80
router_https_port: 443
additional_hostnames: []
additional_fqdns: []
database: {mysql 5.7}
project_tld: ddev.site
use_dns_when_possible: true
composer_version: 2
nodejs_version: 20
default_container_timeout: 120


======== mutagen situation ========
looking for #ddev-generated in mutagen.yml in project /home/cbrun/Docker/toto9
.ddev/mutagen/mutagen.yml not found


======== Creating dummy project named tryddevproject-8377 in ../tryddevproject-8377 ========
Creating a new DDEV project config in the current directory (/home/cbrun/Docker/tryddevproject-8377)
Once completed, your configuration will be written to /home/cbrun/Docker/tryddevproject-8377/.ddev/config.yaml

Configuring a 'php' project with docroot 'web' at /home/cbrun/Docker/tryddevproject-8377/web
Configuration complete. You may now run 'ddev start'.


======== OS Information ========
Linux FoxFly 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux


======== User information ========
uid=1000(cbrun) gid=1000(cbrun) groups=1000(cbrun),4(adm),20(dialout),24(cdrom),25(floppy),27(sudo),29(audio),30(dip),44(video),46(plugdev),116(netdev),999(docker)


======== ddev version ========
 ITEM             VALUE
 DDEV version     v1.23.0
 architecture     amd64
 cgo_enabled      0
 db               ddev/ddev-dbserver-mariadb-10.11:v1.23.0
 ddev-ssh-agent   ddev/ddev-ssh-agent:v1.23.0
 docker           26.1.0
 docker-api       1.45
 docker-compose   v2.26.1
 docker-platform  wsl2-docker-ce
 mutagen          0.17.2
 os               linux
 router           ddev/ddev-traefik-router:v1.23.0
 web              ddev/ddev-webserver:v1.23.0-1



======== proxy settings ========

 HTTP_PROXY=''
 HTTPS_PROXY=''
 http_proxy=''
 NO_PROXY=''



======== DDEV global info ========
developer-mode=false
disable-http2=false
fail-on-hook-fail=false
instrumentation-opt-in=true
instrumentation-queue-size=0
instrumentation-reporting-interval=0s
instrumentation-user=
internet-detection-timeout-ms=3000
last-started-version=v1.23.0
letsencrypt-email=
mailpit-http-port=8025
mailpit-https-port=8026
mkcert-caroot=/mnt/c/Users/Clemc/AppData/Local/mkcert
no-bind-mounts=false
omit-containers=[]
performance-mode=none
project-tld=ddev.site
required-docker-compose-version=v2.26.1
router=traefik
router-bind-all-interfaces=false
router-http-port=80
router-https-port=443
simple-formatting=false
table-style=default
traefik-monitor-port=10999
use-docker-compose-from-path=false
use-hardened-images=false
use-letsencrypt=false
wsl2-no-windows-hosts-mgt=false
xdebug-ide-location=


======== DOCKER provider info ========
docker client location: /usr/bin/docker

docker client alternate locations:
/usr/bin/docker
/bin/docker
/mnt/c/Program Files/Docker/Docker/resources/bin/docker

Docker provider: wsl2-docker-ce
docker version:
Client: Docker Engine - Community
 Version:           26.1.0
 API version:       1.45
 Go version:        go1.21.9
 Git commit:        9714adc
 Built:             Mon Apr 22 17:07:12 2024
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          26.1.0
  API version:      1.45 (minimum version 1.24)
  Go version:       go1.21.9
  Git commit:       c8af8eb
  Built:            Mon Apr 22 17:07:12 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.31
  GitCommit:        e377cd56a71523140ca6ae87e30244719194a521
 runc:
  Version:          1.1.12
  GitCommit:        v1.1.12-0-g51d5e94
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

DOCKER_DEFAULT_PLATFORM=notset
Docker platform: wsl2-docker-ce
Using Docker context: default (unix:///var/run/docker.sock)
docker-compose: v2.26.1
Using DOCKER_HOST=unix:///var/run/docker.sock
Docker version: 26.1.0
Able to run simple container that mounts a volume.
Able to use internet inside container.
Docker disk space:Filesystem                Size      Used Available Use% Mounted on
overlay                 251.0G     37.0G    201.1G  16% /


======== Existing docker containers ========
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES


======== mkcert information ========
/usr/bin/mkcert
/bin/mkcert
/mnt/c/Users/Clemc/AppData/Local/mkcert
total 8
-r-xr-xr-x 1 cbrun cbrun 2484 Feb 22  2023 rootCA-key.pem
-rwxrwxrwx 1 cbrun cbrun 1740 Feb 22  2023 rootCA.pem


======== ping attempt on ddev.site ========
PING dkdkd.ddev.site (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.016 ms

--- dkdkd.ddev.site ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.016/0.016/0.016/0.000 ms


======== Project startup ========
Network ddev_default created
Starting tryddevproject-8377...
2024-04-26T09:32:00.737 Pulled image for ddev/ddev-webserver:v1.23.0-1
2024-04-26T09:32:00.737 Pulled image for busybox:stable
2024-04-26T09:32:00.738 Pulled image for ddev/ddev-ssh-agent:v1.23.0
2024-04-26T09:32:00.738 Pulled image for ddev/ddev-traefik-router:v1.23.0
2024-04-26T09:32:01.763 chowning /mnt/ddev-global-cache and /var/lib/mysql to 1000
2024-04-26T09:32:02.242 done chowning /mnt/ddev-global-cache and /var/lib/mysql to 1000
 Container ddev-ssh-agent  Created
 Container ddev-ssh-agent  Started
ssh-agent container is running: If you want to add authentication to the ssh-agent container, run 'ddev auth ssh' to enable your keys.
2024-04-26T09:32:04.642 host.docker.internal='172.29.80.1' because IsWSL2 and !IsDockerDesktop; received from ip -4 route show default
2024-04-26T09:32:04.702 Pulled image for ddev/ddev-webserver:v1.23.0-1
v1.23.0: Pulling from ddev/ddev-dbserver-mariadb-10.11
bccd10f490ab: Pulling fs layer
d9d8e1823c6f: Pulling fs layer
84f2e2edb76d: Pulling fs layer
4df97d18a516: Pulling fs layer
79fe85183306: Pulling fs layer
b891b67a5cf8: Pulling fs layer
ac1d0cb433aa: Pulling fs layer
c29a5135f832: Pulling fs layer
4f4fb700ef54: Pulling fs layer
1ff4f1de0bc5: Pulling fs layer
673864f86d20: Pulling fs layer
7b45c0976273: Pulling fs layer
ca9e486aa247: Pulling fs layer
0a97e5ce4743: Pulling fs layer
bc3ffa5c64c8: Pulling fs layer
e60516720eab: Pulling fs layer
48c198af87a5: Pulling fs layer
2c3cedab13cc: Pulling fs layer
0f7f40c17105: Pulling fs layer
5abdabbaa25b: Pulling fs layer
6977c39a1163: Pulling fs layer
f1828522c70b: Pulling fs layer
cbf4763b830e: Pulling fs layer
234b358f066d: Pulling fs layer
4df97d18a516: Waiting
79fe85183306: Waiting
b891b67a5cf8: Waiting
ac1d0cb433aa: Waiting
c29a5135f832: Waiting
4f4fb700ef54: Waiting
1ff4f1de0bc5: Waiting
673864f86d20: Waiting
7b45c0976273: Waiting
ca9e486aa247: Waiting
0a97e5ce4743: Waiting
bc3ffa5c64c8: Waiting
e60516720eab: Waiting
48c198af87a5: Waiting
2c3cedab13cc: Waiting
0f7f40c17105: Waiting
5abdabbaa25b: Waiting
234b358f066d: Waiting
6977c39a1163: Waiting
cbf4763b830e: Waiting
f1828522c70b: Waiting
d9d8e1823c6f: Verifying Checksum
d9d8e1823c6f: Download complete
4df97d18a516: Verifying Checksum
84f2e2edb76d: Verifying Checksum
84f2e2edb76d: Download complete
bccd10f490ab: Download complete
ac1d0cb433aa: Verifying Checksum
ac1d0cb433aa: Download complete
79fe85183306: Verifying Checksum
79fe85183306: Download complete
bccd10f490ab: Pull complete
d9d8e1823c6f: Pull complete
c29a5135f832: Verifying Checksum
c29a5135f832: Download complete
4f4fb700ef54: Verifying Checksum
4f4fb700ef54: Download complete
84f2e2edb76d: Pull complete
4df97d18a516: Pull complete
79fe85183306: Pull complete
1ff4f1de0bc5: Verifying Checksum
1ff4f1de0bc5: Download complete
b891b67a5cf8: Verifying Checksum
b891b67a5cf8: Download complete
7b45c0976273: Verifying Checksum
7b45c0976273: Download complete
ca9e486aa247: Verifying Checksum
ca9e486aa247: Download complete
0a97e5ce4743: Verifying Checksum
0a97e5ce4743: Download complete
bc3ffa5c64c8: Verifying Checksum
bc3ffa5c64c8: Download complete
e60516720eab: Verifying Checksum
e60516720eab: Download complete
673864f86d20: Verifying Checksum
673864f86d20: Download complete
2c3cedab13cc: Verifying Checksum
2c3cedab13cc: Download complete
b891b67a5cf8: Pull complete
ac1d0cb433aa: Pull complete
c29a5135f832: Pull complete
4f4fb700ef54: Pull complete
48c198af87a5: Verifying Checksum
48c198af87a5: Download complete
0f7f40c17105: Download complete
5abdabbaa25b: Verifying Checksum
5abdabbaa25b: Download complete
1ff4f1de0bc5: Pull complete
f1828522c70b: Verifying Checksum
f1828522c70b: Download complete
6977c39a1163: Verifying Checksum
6977c39a1163: Download complete
cbf4763b830e: Verifying Checksum
cbf4763b830e: Download complete
234b358f066d: Verifying Checksum
234b358f066d: Download complete
673864f86d20: Pull complete
7b45c0976273: Pull complete
ca9e486aa247: Pull complete
0a97e5ce4743: Pull complete
bc3ffa5c64c8: Pull complete
e60516720eab: Pull complete
48c198af87a5: Pull complete
2c3cedab13cc: Pull complete
0f7f40c17105: Pull complete
5abdabbaa25b: Pull complete
6977c39a1163: Pull complete
f1828522c70b: Pull complete
cbf4763b830e: Pull complete
234b358f066d: Pull complete
Digest: sha256:8616a3e0ad0554aa26c838819a8cf3e72ae600071c2e9e76e0fd6e32a8c97627
Status: Downloaded newer image for ddev/ddev-dbserver-mariadb-10.11:v1.23.0
docker.io/ddev/ddev-dbserver-mariadb-10.11:v1.23.0
2024-04-26T09:32:13.442 Pulled image for ddev/ddev-dbserver-mariadb-10.11:v1.23.0
2024-04-26T09:32:13.443 Pulled image for ddev/ddev-ssh-agent:v1.23.0
2024-04-26T09:32:13.443 Pulled image for ddev/ddev-traefik-router:v1.23.0
Building project images...
2024-04-26T09:32:13.48 Executing docker-compose -f /home/cbrun/Docker/tryddevproject-8377/.ddev/.ddev-docker-compose-full.yaml build --progress=plain
...Project images built in 3s.
2024-04-26T09:32:16.482 Executing docker-compose -f /home/cbrun/Docker/tryddevproject-8377/.ddev/.ddev-docker-compose-full.yaml up -d
 Network ddev-tryddevproject-8377_default  Created
 Container ddev-tryddevproject-8377-web  Created
 Container ddev-tryddevproject-8377-db  Created
 Container ddev-tryddevproject-8377-web  Started
 Container ddev-tryddevproject-8377-db  Started
2024-04-26T09:32:19.632 Copied /mnt/c/Users/Clemc/AppData/Local/mkcert:CopyIntoVolume_fefqiztmwjxq into /mnt/v/mkcert in 93.246966ms
2024-04-26T09:32:19.657 Exec chown -R 1000 /mnt/v/mkcert stdout=, stderr=, err=<nil>
2024-04-26T09:32:19.926 Pushed mkcert rootca certs to ddev-global-cache/mkcert
2024-04-26T09:32:19.926 VIRTUAL_HOST=tryddevproject-8377.ddev.site for web
2024-04-26T09:32:19.926 HTTP_EXPOSE=80:80,8025:8025 for web
2024-04-26T09:32:19.926 HTTPS_EXPOSE=443:80,8026:8025 for web
2024-04-26T09:32:20.466 Copied /home/cbrun/Docker/tryddevproject-8377/.ddev/traefik:CopyIntoVolume_xymuhxpforjy into /mnt/v/traefik in 70.802694ms
2024-04-26T09:32:20.487 Exec chown -R 1000 /mnt/v/traefik stdout=, stderr=, err=<nil>
2024-04-26T09:32:20.799 Copied Traefik certs in /home/cbrun/Docker/tryddevproject-8377/.ddev/traefik/certs to ddev-global-cache/traefik
2024-04-26T09:32:20.799 Running /start.sh in ddev-webserver
Waiting for web/db containers to become ready: [web db]
2024-04-26T09:32:25.859 Copied /home/cbrun/.ddev/commands:CopyIntoVolume_tqmizumqrmjt into /mnt/v/global-commands in 83.495849ms
2024-04-26T09:32:25.882 Exec chown -R 1000 /mnt/v/global-commands stdout=, stderr=, err=<nil>
2024-04-26T09:32:26.255 Testing to see if /mnt/ddev_config is properly mounted
Starting ddev-router if necessary...
2024-04-26T09:32:26.84 Copied /home/cbrun/.ddev/traefik:CopyIntoVolume_iqamgtetshfq into /mnt/v/traefik in 67.266758ms
2024-04-26T09:32:26.862 Exec chown -R 1000 /mnt/v/traefik stdout=, stderr=, err=<nil>
2024-04-26T09:32:27.085 Copied global Traefik config in /home/cbrun/.ddev/traefik/certs to ddev-global-cache/traefik
 Container ddev-router  Created
 Container ddev-router  Started
2024-04-26T09:32:28.43 Waiting for ddev-router to become ready. docker inspect --format "{{json .State.Health }}" ddev-router
2024-04-26T09:32:29.931 ddev-router is ready
Waiting for additional project containers to become ready...
All project containers are now ready.
Successfully started tryddevproject-8377
Project can be reached at https://tryddevproject-8377.ddev.site https://127.0.0.1:60002


======== Curl of site from inside container ========
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0HTTP/1.1 200 OK
Server: nginx
Date: Fri, 26 Apr 2024 07:32:31 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Vary: Accept-Encoding

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0


======== curl -I of http://tryddevproject-8377.ddev.site from outside ========
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
HTTP/1.1 200 OK
Content-Type: text/html; charset=UTF-8
Date: Fri, 26 Apr 2024 07:32:31 GMT
Server: nginx
Vary: Accept-Encoding



======== Full curl of http://tryddevproject-8377.ddev.site from outside ========
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   198    0   198    0     0  27179      0 --:--:-- --:--:-- --:--:-- 28285
Success accessing database... db via TCP/IP<br />
ddev is working.<br />
The output file for Discord or issue queue is in
<b>/tmp/ddev-debug-test.txt</b><br />
file:///tmp/ddev-debug-test.txt<br />


======== Full curl of https://tryddevproject-8377.ddev.site from outside ========
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.


======== Project ownership on host ========
drwxr-xr-x 4 cbrun cbrun 4096 Apr 26 09:31 ../tryddevproject-8377


======== Project ownership in container ========
drwxr-xr-x 4 cbrun cbrun 4096 Apr 26 07:31 //var/www/html


======== In-container filesystem ========
Filesystem     Type 1K-blocks     Used Available Use% Mounted on
/dev/sdb       ext4 263174212 39638136 210097920  16% /var/www/html


======== Thanks for running the diagnostic! ========
Running ddev launch in 3 seconds
Running ddev launch
/usr/bin/xdg-open: 882: www-browser: not found
/usr/bin/xdg-open: 882: links2: not found
/usr/bin/xdg-open: 882: elinks: not found
/usr/bin/xdg-open: 882: links: not found
/usr/bin/xdg-open: 882: lynx: not found
/usr/bin/xdg-open: 882: w3m: not found
xdg-open: no method available for opening 'https://tryddevproject-8377.ddev.site'
Failed to run launch ; error=exit status 3
Waiting 10 seconds to run ddev stop --unlist
running ddev stop --unlist
 Container ddev-tryddevproject-8377-db  Stopped
 Container ddev-tryddevproject-8377-web  Stopped
 Container ddev-tryddevproject-8377-web  Stopped
 Container ddev-tryddevproject-8377-db  Stopped
 Container ddev-tryddevproject-8377-db  Removed
 Container ddev-tryddevproject-8377-web  Removed
 Network ddev-tryddevproject-8377_default  Removed
Project tryddevproject-8377 has been stopped.


==== Restarting previously-running DDEV projects====
Building project images...
.Project images built in 1s.
 Network ddev-toto_default  Created
 Container ddev-toto-web  Created
 Container ddev-toto-db  Created
 Container ddev-toto-phpmyadmin  Created
 Container ddev-toto-web  Started
 Container ddev-toto-db  Started
 Container ddev-toto-phpmyadmin  Started
Waiting for web/db containers to become ready: [web db]
Failed waiting for web/db containers to become ready: web container failed: log=&{2024-04-26 09:33:16.989726079 +0200 CEST 2024-04-26 09:33:17.475788014 +0200 CEST 1 php-fpm:FATAL Shut down
/var/www/html:OK mailpit:FAILED phpstatus:FAILED }, err=ddev-toto-web container is unhealthy: &{2024-04-26 09:33:16.989726079 +0200 CEST 2024-04-26 09:33:17.475788014 +0200 CEST 1 php-fpm:FATAL Shut down
/var/www/html:OK mailpit:FAILED phpstatus:FAILED }, more info with [
        ddev logs -s web
        docker logs ddev-toto-web
        docker inspect --format "{{ json .State.Health }}" ddev-toto-web | docker run -i --rm ddev/ddev-utilities jq -r
]

Expected Behavior

The expected behavior would be that the web container start....

Actual Behavior

Failed waiting for web/db containers to become ready: web container failed: log=&{2024-04-26 09:30:12.49143589 +0200 CEST 2024-04-26 09:30:13.033261362 +0200 CEST 1 php-fpm:FATAL Shut down
/var/www/html:OK mailpit:FAILED phpstatus:FAILED }, err=ddev-toto-web container is unhealthy: &{2024-04-26 09:30:12.49143589 +0200 CEST 2024-04-26 09:30:13.033261362 +0200 CEST 1 php-fpm:FATAL Shut down
/var/www/html:OK mailpit:FAILED phpstatus:FAILED }, more info with [
        ddev logs -s web
        docker logs ddev-toto-web
        docker inspect --format "{{ json .State.Health }}" ddev-toto-web | docker run -i --rm ddev/ddev-utilities jq -r
]

Steps To Reproduce

  1. In this environment :
    I'm using the last version of ddev to build a Drupal 9 project (yeah I know, Drupal 9 is deprecated but not my choice) on me WSL

  2. With this config :

name: toto
type: drupal9
docroot: ""
php_version: "8.1"
webserver_type: apache-fpm
router_http_port: "80"
router_https_port: "443"
xdebug_enabled: false
additional_hostnames: []
additional_fqdns: []
database:
  type: mysql
  version: "5.7"
nfs_mount_enabled: false
mutagen_enabled: false
use_dns_when_possible: true
composer_version: "2"
web_environment: []

# Key features of ddev's config.yaml:

# name: <projectname> # Name of the project, automatically provides
#   http://projectname.ddev.site and https://projectname.ddev.site

# type: <projecttype>  # drupal6/7/8, backdrop, typo3, wordpress, php

# docroot: <relative_path> # Relative path to the directory containing index.php.

# php_version: "7.4"  # PHP version to use, "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"

# You can explicitly specify the webimage but this
# is not recommended, as the images are often closely tied to ddev's' behavior,
# so this can break upgrades.

# webimage: <docker_image>  # nginx/php docker image.

# database:
#   type: <dbtype> # mysql, mariadb
#   version: <version> # database version, like "10.3" or "8.0"
# Note that mariadb_version or mysql_version from v1.18 and earlier
# will automatically be converted to this notation with just a "ddev config --auto"

# router_http_port: <port>  # Port to be used for http (defaults to port 80)
# router_https_port: <port> # Port for https (defaults to 443)

# xdebug_enabled: false  # Set to true to enable xdebug and "ddev start" or "ddev restart"
# Note that for most people the commands
# "ddev xdebug" to enable xdebug and "ddev xdebug off" to disable it work better,
# as leaving xdebug enabled all the time is a big performance hit.

# xhprof_enabled: false  # Set to true to enable xhprof and "ddev start" or "ddev restart"
# Note that for most people the commands
# "ddev xhprof" to enable xhprof and "ddev xhprof off" to disable it work better,
# as leaving xhprof enabled all the time is a big performance hit.

# webserver_type: nginx-fpm  # or apache-fpm

# timezone: Europe/Berlin
# This is the timezone used in the containers and by PHP;
# it can be set to any valid timezone,
# see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
# For example Europe/Dublin or MST7MDT

# composer_root: <relative_path>
# Relative path to the composer root directory from the project root. This is
# the directory which contains the composer.json and where all Composer related
# commands are executed.

# composer_version: "2"
# if composer_version:"2" it will use the most recent composer v2
# It can also be set to "1", to get most recent composer v1
# or "" for the default v2 created at release time.
# It can be set to any existing specific composer version.
# After first project 'ddev start' this will not be updated until it changes

# nodejs_version: "16"
# change from the default system Node.js version to another supported version, like 12, 14, 17, 18.
# Note that you can use 'ddev nvm' or nvm inside the web container to provide nearly any
# Node.js version, including v6, etc.

# additional_hostnames:
#  - somename
#  - someothername
# would provide http and https URLs for "somename.ddev.site"
# and "someothername.ddev.site".

# additional_fqdns:
#  - example.com
#  - sub1.example.com
# would provide http and https URLs for "example.com" and "sub1.example.com"
# Please take care with this because it can cause great confusion.

# upload_dir: custom/upload/dir
# would set the destination path for ddev import-files to <docroot>/custom/upload/dir

# working_dir:
#   web: /var/www/html
#   db: /home
# would set the default working directory for the web and db services.
# These values specify the destination directory for ddev ssh and the
# directory in which commands passed into ddev exec are run.

# omit_containers: [db, dba, ddev-ssh-agent]
# Currently only these containers are supported. Some containers can also be
# omitted globally in the ~/.ddev/global_config.yaml. Note that if you omit
# the "db" container, several standard features of ddev that access the
# database container will be unusable. In the global configuration it is also
# possible to omit ddev-router, but not here.

# nfs_mount_enabled: false
# Great performance improvement but requires host configuration first.
# See https://ddev.readthedocs.io/en/stable/users/performance/#using-nfs-to-mount-the-project-into-the-container

# mutagen_enabled: false
# Performance improvement using mutagen asynchronous updates.
# See https://ddev.readthedocs.io/en/latest/users/performance/#using-mutagen

# fail_on_hook_fail: False
# Decide whether 'ddev start' should be interrupted by a failing hook

# host_https_port: "59002"
# The host port binding for https can be explicitly specified. It is
# dynamic unless otherwise specified.
# This is not used by most people, most people use the *router* instead
# of the localhost port.

# host_webserver_port: "59001"
# The host port binding for the ddev-webserver can be explicitly specified. It is
# dynamic unless otherwise specified.
# This is not used by most people, most people use the *router* instead
# of the localhost port.

# host_db_port: "59002"
# The host port binding for the ddev-dbserver can be explicitly specified. It is dynamic
# unless explicitly specified.

# phpmyadmin_port: "8036"
# phpmyadmin_https_port: "8037"
# The PHPMyAdmin ports can be changed from the default 8036 and 8037

# host_phpmyadmin_port: "8036"
# The phpmyadmin (dba) port is not normally bound on the host at all, instead being routed
# through ddev-router, but it can be specified and bound.

# mailhog_port: "8025"
# mailhog_https_port: "8026"
# The MailHog ports can be changed from the default 8025 and 8026

# host_mailhog_port: "8025"
# The mailhog port is not normally bound on the host at all, instead being routed
# through ddev-router, but it can be bound directly to localhost if specified here.

# webimage_extra_packages: [php7.4-tidy, php-bcmath]
# Extra Debian packages that are needed in the webimage can be added here

# dbimage_extra_packages: [telnet,netcat]
# Extra Debian packages that are needed in the dbimage can be added here

# use_dns_when_possible: true
# If the host has internet access and the domain configured can
# successfully be looked up, DNS will be used for hostname resolution
# instead of editing /etc/hosts
# Defaults to true

# project_tld: ddev.site
# The top-level domain used for project URLs
# The default "ddev.site" allows DNS lookup via a wildcard
# If you prefer you can change this to "ddev.local" to preserve
# pre-v1.9 behavior.

# ngrok_args: --basic-auth username:pass1234
# Provide extra flags to the "ngrok http" command, see
# https://ngrok.com/docs#http or run "ngrok http -h"

# disable_settings_management: false
# If true, ddev will not create CMS-specific settings files like
# Drupal's settings.php/settings.ddev.php or TYPO3's AdditionalConfiguration.php
# In this case the user must provide all such settings.

# You can inject environment variables into the web container with:
# web_environment:
# - SOMEENV=somevalue
# - SOMEOTHERENV=someothervalue

# no_project_mount: false
# (Experimental) If true, ddev will not mount the project into the web container;
# the user is responsible for mounting it manually or via a script.
# This is to enable experimentation with alternate file mounting strategies.
# For advanced users only!

# bind_all_interfaces: false
# If true, host ports will be bound on all network interfaces,
# not just the localhost interface. This means that ports
# will be available on the local network if the host firewall
# allows it.

# default_container_timeout: 120
# The default time that ddev waits for all containers to become ready can be increased from
# the default 120. This helps in importing huge databases, for example.

# Many ddev commands can be extended to run tasks before or after the
# ddev command is executed, for example "post-start", "post-import-db",
# "pre-composer", "post-composer"
# See https://ddev.readthedocs.io/en/stable/users/extend/custom-commands/ for more
# information on the commands that can be extended and the tasks you can define
# for them. Example:
#hooks:
# post-import-db:
#   - exec: drush cr
#   - exec: drush updb
  1. Run :
    I'm only running "ddev start" like you can see there :
ddev start
Network ddev_default created
Starting toto...
v1.23.0-1: Pulling from ddev/ddev-webserver
ec2f1d99b435: Pull complete
Digest: sha256:cb61912d3e4680a12fbb25c7a3221d3c8055c5cac021bf559f1dc265665ace00
Status: Downloaded newer image for ddev/ddev-webserver:v1.23.0-1
docker.io/ddev/ddev-webserver:v1.23.0-1
stable: Pulling from library/busybox
7b2699543f22: Pull complete
Digest: sha256:c3839dd800b9eb7603340509769c43e146a74c63dca3045a8e7dc8ee07e53966
Status: Downloaded newer image for busybox:stable
docker.io/library/busybox:stable
v1.23.0: Pulling from ddev/ddev-traefik-router
4abcf2066143: Pull complete
43642c84faa0: Pull complete
4b3f89104cf6: Pull complete
adb2854bd2e9: Pull complete
4f3482524a90: Pull complete
6abee0d8b972: Pull complete
14e7232c4ac1: Pull complete
b997fb3eba4d: Pull complete
Digest: sha256:05d248a09623eaae12306a782044be01c381aca4407f047408994fe3dbc8a0af
Status: Downloaded newer image for ddev/ddev-traefik-router:v1.23.0
docker.io/ddev/ddev-traefik-router:v1.23.0
v1.23.0: Pulling from ddev/ddev-ssh-agent
c0edef2937fa: Pull complete
1cc6f4913148: Pull complete
74b00a4b9ebb: Pull complete
4f4fb700ef54: Pull complete
819787fc5259: Pull complete
0a9f162539b5: Pull complete
Digest: sha256:459801bac3560b252e77b64dba3ec7cfdb1c668cb7826cb8e80d7cb424502e72
Status: Downloaded newer image for ddev/ddev-ssh-agent:v1.23.0
docker.io/ddev/ddev-ssh-agent:v1.23.0
 Volume "ddev-ssh-agent_dot_ssh"  Created
 Volume "ddev-ssh-agent_socket_dir"  Created
 Container ddev-ssh-agent  Created
 Container ddev-ssh-agent  Started
ssh-agent container is running: If you want to add authentication to the ssh-agent container, run 'ddev auth ssh' to enable your keys.
v1.23.0: Pulling from ddev/ddev-dbserver-mysql-5.7
717333736740: Pull complete
4f4fb700ef54: Pull complete
bd665fc9711f: Pull complete
03cce3f98ad6: Pull complete
d8658b486607: Pull complete
7c8f9bac8b28: Pull complete
ebcfc7a60489: Pull complete
fd4089183cd9: Pull complete
1890d4246fa5: Pull complete
056628c324dc: Pull complete
0614186435aa: Pull complete
d42c05304dd0: Pull complete
0e6964ffbbe1: Pull complete
3db14627ec81: Pull complete
a6c6ecd6dfef: Pull complete
16e86232c7bb: Pull complete
Digest: sha256:59aae4f43ec42438059a04915d8b1b2d7263004f42e30745ac38b3dfc0b5ed30
Status: Downloaded newer image for ddev/ddev-dbserver-mysql-5.7:v1.23.0
docker.io/ddev/ddev-dbserver-mysql-5.7:v1.23.0
5: Pulling from library/phpmyadmin
b0a0cf830b12: Pull complete
c93478d47932: Pull complete
e74cc574d0d2: Pull complete
e4782e138a90: Pull complete
cfeec87621ae: Pull complete
c1badcd002c0: Pull complete
e0d463a60cb6: Pull complete
d1ad50b335f5: Pull complete
98c64971444a: Pull complete
ba7d8962b7e1: Pull complete
e620d8fafd56: Pull complete
2038239aa3e1: Pull complete
df99eaff6870: Pull complete
1d61e18908d9: Pull complete
a503059f17a4: Pull complete
fb51dbc98e8f: Pull complete
a1b6a14258b3: Pull complete
cf8ad639c873: Pull complete
Digest: sha256:57de6b3d028cb77bca69523ab2f65a61b23d40db5f4c1c1163b7b16dc29e6a3d
Status: Downloaded newer image for phpmyadmin:5
docker.io/library/phpmyadmin:5
Building project images...
......................................................................................................................................................................................................................................................................................................................Project images built in 5m10s.
 Network ddev-toto_default  Created
 Container ddev-toto-db  Created
 Container ddev-toto-web  Created
 Container ddev-toto-phpmyadmin  Created
 Container ddev-toto-web  Started
 Container ddev-toto-db  Started
 Container ddev-toto-phpmyadmin  Started
Waiting for web/db containers to become ready: [web db]
Failed waiting for web/db containers to become ready: web container failed: log=&{2024-04-26 09:30:12.49143589 +0200 CEST 2024-04-26 09:30:13.033261362 +0200 CEST 1 php-fpm:FATAL Shut down
/var/www/html:OK mailpit:FAILED phpstatus:FAILED }, err=ddev-toto-web container is unhealthy: &{2024-04-26 09:30:12.49143589 +0200 CEST 2024-04-26 09:30:13.033261362 +0200 CEST 1 php-fpm:FATAL Shut down
/var/www/html:OK mailpit:FAILED phpstatus:FAILED }, more info with [
        ddev logs -s web
        docker logs ddev-toto-web
        docker inspect --format "{{ json .State.Health }}" ddev-toto-web | docker run -i --rm ddev/ddev-utilities jq -r
]
  1. See error :
    The "ddev logs -s web" give me this :
+ set -eu -o pipefail
+ logpipe=/var/tmp/logpipe
+ [[ ! -p /var/tmp/logpipe ]]
+ mkfifo /var/tmp/logpipe
+ trap 'trap - SIGTERM && kill -- -1' SIGINT SIGTERM EXIT SIGHUP SIGQUIT
+ cat
+ set -o errexit nounset pipefail
+ rm -f /tmp/healthy
+ pkill -0 supervisord
+ rm -f /var/run/supervisor.sock
+ export DDEV_WEB_ENTRYPOINT=/mnt/ddev_config/web-entrypoint.d
+ DDEV_WEB_ENTRYPOINT=/mnt/ddev_config/web-entrypoint.d
+ source /functions.sh
+ '[' '!' -f /home/cbrun/.gitconfig ']'
+ DDEV_PHP_VERSION=8.1
+ DDEV_WEBSERVER_TYPE=apache-fpm
+ '[' -n 8.1 ']'
+ update-alternatives --set php /usr/bin/php8.1
update-alternatives: using /usr/bin/php8.1 to provide /usr/bin/php (php) in manual mode
update-alternatives: warning: skip creation of /usr/share/man/man1/php.1.gz because associated file /usr/share/man/man1/php8.1.1.gz (of link group php) doesn't exist
+ ln -sf /usr/sbin/php-fpm8.1 /usr/sbin/php-fpm
+ export PHP_INI=/etc/php/8.1/fpm/php.ini
+ PHP_INI=/etc/php/8.1/fpm/php.ini
+ '[' '!' -z ']'
+ '[' -d /mnt/ddev_config/php ']'
++ ls -A '/mnt/ddev_config/php/*.ini'
+ '[' -n '' ']'
+ '[' -d /mnt/ddev_config/nginx_full ']'
+ rm -rf /etc/nginx/sites-enabled
+ cp -r /mnt/ddev_config/nginx_full /etc/nginx/sites-enabled/
+ '[' -d /mnt/ddev_config/apache ']'
+ rm -rf /etc/apache2/sites-enabled
+ cp -r /mnt/ddev_config/apache /etc/apache2/sites-enabled
+ '[' drupal9 = backdrop ']'
+ '[' drupal9 = drupal6 ']'
+ '[' drupal9 = drupal7 ']'
+ '[' drupal9 = backdrop ']'
++ id -un
++ id -gn
+ printf '\nexport APACHE_RUN_USER=cbrun\nexport APACHE_RUN_GROUP=cbrun\n'
+ a2enmod access_compat alias auth_basic authn_core authn_file authz_core authz_host authz_user autoindex deflate dir env filter mime mpm_prefork negotiation reqtimeout rewrite setenvif status
Considering dependency authn_core for access_compat:
Module authn_core already enabled
Module access_compat already enabled
Module alias already enabled
Considering dependency authn_core for auth_basic:
Module authn_core already enabled
Module auth_basic already enabled
Module authn_core already enabled
Module authn_file already enabled
Module authz_core already enabled
Considering dependency authz_core for authz_host:
Module authz_core already enabled
Module authz_host already enabled
Considering dependency authz_core for authz_user:
Module authz_core already enabled
Module authz_user already enabled
Module autoindex already enabled
Considering dependency filter for deflate:
Module filter already enabled
Module deflate already enabled
Module dir already enabled
Module env already enabled
Module filter already enabled
Module mime already enabled
Considering conflict mpm_event for mpm_prefork:
Considering conflict mpm_worker for mpm_prefork:
Enabling module mpm_prefork.
Module negotiation already enabled
Module reqtimeout already enabled
Enabling module rewrite.
Module setenvif already enabled
Module status already enabled
To activate the new configuration, you need to run:
  service apache2 restart
+ a2enconf charset localized-error-pages other-vhosts-access-log security serve-cgi-bin
Conf charset already enabled
Conf localized-error-pages already enabled
Conf other-vhosts-access-log already enabled
Conf security already enabled
Conf serve-cgi-bin already enabled
+ '[' apache-fpm = apache-fpm ']'
+ a2enmod proxy_fcgi
Considering dependency proxy for proxy_fcgi:
Enabling module proxy.
Enabling module proxy_fcgi.
To activate the new configuration, you need to run:
  service apache2 restart
+ a2enconf php8.1-fpm
Enabling conf php8.1-fpm.
To activate the new configuration, you need to run:
  service apache2 reload
+ a2dissite 000-default
Site 000-default already disabled
+ '[' false = true ']'
+ disable_xdebug
Disabled xdebug
+ phpenmod assert
+ ls /var/www/html
+ sudo mkdir -p /mnt/ddev-global-cache/terminus/cache
+ sudo mkdir -p /mnt/ddev-global-cache/bashhistory/toto-web /mnt/ddev-global-cache/mysqlhistory/toto-web /mnt/ddev-global-cache/nvm_dir/toto-web /mnt/ddev-global-cache/npm /mnt/ddev-global-cache/yarn/classic /mnt/ddev-global-cache/yarn/berry /mnt/ddev-global-cache/corepack
++ id -u
++ id -g
+ sudo chown -R 1000:1000 /mnt/ddev-global-cache/ /var/lib/php
+ cd /home/cbrun
+ exit 22
+ true
+ mkdir -p /home/cbrun/.yarn/berry
+ ln -sf /mnt/ddev-global-cache/yarn/berry /home/cbrun/.yarn/berry/cache
+ ln -sf /mnt/ddev-global-cache/nvm_dir/toto-web /home/cbrun/.nvm
+ '[' '!' -f /home/cbrun/.nvm/nvm.sh ']'
+ '[' -d /mnt/ddev_config/.homeadditions ']'
+ cp -r /mnt/ddev_config/.homeadditions/. /home/cbrun/
+ '[' '!' -f /mnt/ddev-global-cache/mkcert/rootCA.pem ']'
+ mkcert -install
The local CA is now installed in the system trust store! ⚡️

+ CAROOT=/mnt/ddev-global-cache/mkcert
+ mkcert -cert-file /etc/ssl/certs/master.crt -key-file /etc/ssl/certs/master.key toto.ddev.site localhost 127.0.0.1 127.0.0.1 web ddev-toto-web ddev-toto-web.ddev

Created a new certificate valid for the following names 📜
 - "toto.ddev.site"
 - "localhost"
 - "127.0.0.1"
 - "127.0.0.1"
 - "web"
 - "ddev-toto-web"
 - "ddev-toto-web.ddev"

The certificate is at "/etc/ssl/certs/master.crt" and the key at "/etc/ssl/certs/master.key" ✅

It will expire on 26 July 2026 🗓

+ echo 'Server started'
Server started
+ unset PHP_IDE_CONFIG
+ ddev_python_setup
+ set -e
+ '[' apache-fpm = nginx-gunicorn ']'
+ set +e
+ ddev_custom_init_scripts
+ echo 'Loading custom entrypoint config from /mnt/ddev_config/web-entrypoint.d'
Loading custom entrypoint config from /mnt/ddev_config/web-entrypoint.d
+ ls '/mnt/ddev_config/web-entrypoint.d/*.sh'
+ logpipe=/var/tmp/logpipe
+ [[ ! -p /var/tmp/logpipe ]]
+ exec /usr/bin/supervisord -n -c /etc/supervisor/supervisord-apache-fpm.conf
2024-04-26 07:33:08,305 INFO Included extra file "/etc/supervisor/apache.conf" during parsing
2024-04-26 07:33:08,306 INFO Included extra file "/etc/supervisor/php-fpm.conf" during parsing
2024-04-26 07:33:08,306 INFO Included extra file "/etc/supervisor/conf.d/mailhog.conf" during parsing
2024-04-26 07:33:08,306 INFO Included extra file "/etc/supervisor/conf.d/supervisor.conf" during parsing
2024-04-26 07:33:08,307 INFO RPC interface 'supervisor' initialized
2024-04-26 07:33:08,307 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2024-04-26 07:33:08,307 INFO supervisord started with pid 46
2024-04-26 07:33:08,742 INFO spawned: 'php-fpm' with pid 2063
2024-04-26 07:33:08,744 INFO spawned: 'apache2' with pid 2064
2024-04-26 07:33:08,747 INFO spawned: 'mailpit' with pid 2068
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.22.0.2. Set the 'ServerName' directive globally to suppress this message
[Fri Apr 26 07:33:08.763457 2024] [ssl:warn] [pid 2083] AH01909: 172.22.0.2:443:0 server certificate does NOT include an ID which matches the server name
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.22.0.2. Set the 'ServerName' directive globally to suppress this message
[Fri Apr 26 07:33:08.767743 2024] [ssl:warn] [pid 2083] AH01909: 172.22.0.2:443:0 server certificate does NOT include an ID which matches the server name
[Fri Apr 26 07:33:08.769306 2024] [mpm_prefork:notice] [pid 2083] AH00163: Apache/2.4.59 (Debian) OpenSSL/3.0.11 configured -- resuming normal operations
[Fri Apr 26 07:33:08.769325 2024] [core:notice] [pid 2083] AH00094: Command line: '/usr/sbin/apache2 -D FOREGROUND'
[26-Apr-2024 07:33:08] ERROR: Unable to create the PID file (/run/php/php8.1-fpm.pid).: Permission denied (13)
[26-Apr-2024 07:33:08] ERROR: FPM initialization failed
2024-04-26 07:33:08,778 WARN exited: php-fpm (exit status 78; not expected)
[Fri Apr 26 07:33:08.991199 2024] [proxy:error] [pid 2084] (111)Connection refused: AH02454: FCGI: attempt to connect to Unix domain socket /var/run/php-fpm.sock (localhost:8000) failed
[Fri Apr 26 07:33:08.991225 2024] [proxy_fcgi:error] [pid 2084] [client 127.0.0.1:38954] AH01079: failed to make connection to backend: localhost
2024-04-26 07:33:09,993 INFO spawned: 'php-fpm' with pid 2100
2024-04-26 07:33:09,993 INFO success: apache2 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-04-26 07:33:09,993 INFO success: mailpit entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
[26-Apr-2024 07:33:10] ERROR: Unable to create the PID file (/run/php/php8.1-fpm.pid).: Permission denied (13)
[26-Apr-2024 07:33:10] ERROR: FPM initialization failed
2024-04-26 07:33:10,084 WARN exited: php-fpm (exit status 78; not expected)
[Fri Apr 26 07:33:10.415053 2024] [proxy:error] [pid 2085] (111)Connection refused: AH02454: FCGI: attempt to connect to Unix domain socket /var/run/php-fpm.sock (localhost:8000) failed
[Fri Apr 26 07:33:10.415083 2024] [proxy_fcgi:error] [pid 2085] [client 127.0.0.1:38958] AH01079: failed to make connection to backend: localhost
[Fri Apr 26 07:33:11.811148 2024] [proxy:error] [pid 2086] (111)Connection refused: AH02454: FCGI: attempt to connect to Unix domain socket /var/run/php-fpm.sock (localhost:8000) failed
[Fri Apr 26 07:33:11.811181 2024] [proxy_fcgi:error] [pid 2086] [client 127.0.0.1:38962] AH01079: failed to make connection to backend: localhost
2024-04-26 07:33:12,813 INFO spawned: 'php-fpm' with pid 2133
[26-Apr-2024 07:33:12] ERROR: Unable to create the PID file (/run/php/php8.1-fpm.pid).: Permission denied (13)
[26-Apr-2024 07:33:12] ERROR: FPM initialization failed
2024-04-26 07:33:12,874 WARN exited: php-fpm (exit status 78; not expected)
[Fri Apr 26 07:33:13.207880 2024] [proxy:error] [pid 2087] (111)Connection refused: AH02454: FCGI: attempt to connect to Unix domain socket /var/run/php-fpm.sock (localhost:8000) failed
[Fri Apr 26 07:33:13.207910 2024] [proxy_fcgi:error] [pid 2087] [client 127.0.0.1:38966] AH01079: failed to make connection to backend: localhost
[Fri Apr 26 07:33:14.602093 2024] [proxy:error] [pid 2088] (111)Connection refused: AH02454: FCGI: attempt to connect to Unix domain socket /var/run/php-fpm.sock (localhost:8000) failed
[Fri Apr 26 07:33:14.602122 2024] [proxy_fcgi:error] [pid 2088] [client 127.0.0.1:38970] AH01079: failed to make connection to backend: localhost
2024-04-26 07:33:15,961 INFO spawned: 'php-fpm' with pid 2178
[Fri Apr 26 07:33:15.987144 2024] [proxy:error] [pid 2084] (111)Connection refused: AH02454: FCGI: attempt to connect to Unix domain socket /var/run/php-fpm.sock (localhost:8000) failed
[Fri Apr 26 07:33:15.987163 2024] [proxy_fcgi:error] [pid 2084] [client 127.0.0.1:38974] AH01079: failed to make connection to backend: localhost
[26-Apr-2024 07:33:15] ERROR: Unable to create the PID file (/run/php/php8.1-fpm.pid).: Permission denied (13)
[26-Apr-2024 07:33:15] ERROR: FPM initialization failed
2024-04-26 07:33:15,991 WARN exited: php-fpm (exit status 78; not expected)
2024-04-26 07:33:16,993 INFO gave up: php-fpm entered FATAL state, too many start retries too quickly
2024-04-26 07:33:17,241 INFO waiting for apache2, mailpit to die
2024-04-26 07:33:17,247 INFO stopped: mailpit (exit status 0)
[Fri Apr 26 07:33:17.247429 2024] [mpm_prefork:notice] [pid 2083] AH00170: caught SIGWINCH, shutting down gracefully
2024-04-26 07:33:18,259 WARN stopped: apache2 (terminated by SIGTERM)
+ trap - SIGTERM
+ kill -- -1

Anything else?

No response

@bhanu951
Copy link

bhanu951 commented Apr 26, 2024

Can confirm. I am also facing the same error, after updating to latest DDEV and Docker Versions.

I restarted system multiple times after upgrade.

MacBook Pro M1 Chip.

OS : macOS Monterey Version 12.5

ddev version v1.23.0

Docker version 26.0.0, build 2ae903e

I have PHP8.2 so I am getting this error.

ERROR: Unable to create the PID file (/run/php/php8.2-fpm.pid).: Permission denied (13)

@rfay
Copy link
Member

rfay commented Apr 26, 2024

I guess you both probably have a .ddev/web-build/Dockerfile that does something? Could you please show that? It apparently needs to chmod the pid files after whatever it does.

Note that ddev debug test works fine and shows none of this, so I guess you must have custom build configuration.

@Clemchan33
Copy link
Author

Clemchan33 commented Apr 26, 2024

Hi @rfay ,

I don't remember if my .ddev/web-build/Dockerfile do something specific because it worked until I update to the latest version of ddev...

This is my .ddev/web-build/Dockerfile :

#ddev-generated
# You can copy this Dockerfile.example to Dockerfile to add configuration
# or packages or anything else to your webimage
# These additions will be appended last to ddev's own Dockerfile

RUN apt-get update && apt-get upgrade -y
RUN sudo apt-get update && sudo apt-get install apt-transport-https
RUN wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo gpg  --dearmor -o /usr/share/keyrings/dart.gpg
RUN echo 'deb [signed-by=/usr/share/keyrings/dart.gpg arch=amd64] https://storage.googleapis.com/download.dartlang.org/linux/debian stable main' | sudo tee /etc/apt/sources.list.d/dart_stable.list
RUN apt-get update && apt-get install dart
RUN npm install -g sass

I can screen you my .ddev and you will see I didn't make another custom dockerfile for this project :
No title

@bhanu951
Copy link

Thanks @rfay for looking into this.

This is my .ddev/web-build/Dockerfile . It used to work before todays update.


ARG BASE_IMAGE
FROM $BASE_IMAGE

ENV PHP_VERSION=8.2
RUN disable_xdebug
RUN if [ ! -f /usr/bin/sed ]; then ln -sf /bin/sed /usr/bin/sed; fi
RUN (apt-get update || true) && DEBIAN_FRONTEND=noninteractive apt-get install -y -o Dpkg::Options::="--force-confnew" --no-install-recommends --no-install-suggests build-essential make autoconf libc-dev pkg-config php-pear logrotate php${PHP_VERSION}-dev libmcrypt-dev ffmpeg python3.11

# The "echo" below just forces accepting the "automatic" configuration, the same as hitting <RETURN>
RUN echo | sudo pecl install mcrypt
# Because php7.1-mcrypt is already installed in web container we can just copy its mcrypt.ini
RUN cp /etc/php/7.1/mods-available/mcrypt.ini /etc/php/${PHP_VERSION}/mods-available/ && phpenmod mcrypt

RUN echo "Built on $(date)" > $(pwd)/build-date.txt


@rfay
Copy link
Member

rfay commented Apr 26, 2024

I assume that if you add this to your Dockerfile it will work. Also if you remove the Dockerfile it works right?

RUN chmod 777 /run/php/php8.1-fpm.pid

I'd be interested in seeing the output of ddev debug refresh (the build process) as well.

@rfay
Copy link
Member

rfay commented Apr 26, 2024

@bhanu951 I imagine you need

RUN chmod 777 /run/php/php8.2-fpm.pid

DDEV v1.23.0 is built on Debian 12 Bookworm, and some things are a little different.

I'd like to know if that fixes it for you, if removing the Dockerfile fixes it for you, and what your ddev debug refresh shows as well.

You shouldn't need to install python3.11 btw.

@bhanu951
Copy link

@rfay It did not solve it. Getting below error.


#21 [web 11/20] RUN echo | sudo chmod 777 /run/php/php8.2-fpm.pid
#21 0.098 chmod: cannot access '/run/php/php8.2-fpm.pid': No such file or directory
#21 ERROR: process "/bin/bash -c echo | sudo chmod 777 /run/php/php${PHP_VERSION}-fpm.pid" did not complete successfully: exit code: 1

You shouldn't need to install python3.11 btw.

Any specific reason ?

@rfay
Copy link
Member

rfay commented Apr 26, 2024

python3 is there by default.

Maybe you need to RUN mkdir -p /run/php && chmod 777 /run/php

@stasadev
Copy link
Member

Related to:

The fix is already available in DDEV HEAD, if you want to test it.

Or simply modify the Dockerfile, chmod without mkdir is enough:

RUN chmod 777 /run/php

@bhanu951
Copy link

Removing the Dockerfile and restarting the project worked.

But adding below commands in the Dockerfile did not work.


RUN echo | sudo chmod 777 /run/php
RUN echo | sudo chmod 777 /run/php/php${PHP_VERSION}-fpm.pid

or

RUN echo | sudo mkdir -p /run/php && chmod 777 /run/php
RUN echo | sudo chmod 777 /run/php/php${PHP_VERSION}-fpm.pid

Error


#20 102.7 Setting up gcc (4:12.2.0-3) ...
#20 102.7 Setting up libpocketsphinx3:arm64 (0.8+5prealpha+1-15) ...
#20 102.7 Setting up php8.2-dev (8.2.18-1+0~20240422.54+debian12~1.gbp91aa2d) ...
#20 102.7 update-alternatives: using /usr/bin/php-config8.2 to provide /usr/bin/php-config (php-config) in auto mode
#20 102.7 update-alternatives: warning: skip creation of /usr/share/man/man1/php-config.1.gz because associated file /usr/share/man/man1/php-config8.2.1.gz (of link group php-config) doesn't exist
#20 102.7 update-alternatives: using /usr/bin/phpize8.2 to provide /usr/bin/phpize (phpize) in auto mode
#20 102.7 update-alternatives: warning: skip creation of /usr/share/man/man1/phpize.1.gz because associated file /usr/share/man/man1/phpize8.2.1.gz (of link group phpize) doesn't exist
#20 102.7 Setting up libgl1:arm64 (1.6.0-1) ...
#20 102.7 Setting up g++ (4:12.2.0-3) ...
#20 102.7 update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode
#20 102.7 Setting up build-essential (12.9) ...
#20 102.7 Setting up libavfilter8:arm64 (7:5.1.4-0+deb12u1) ...
#20 102.7 Setting up libavdevice59:arm64 (7:5.1.4-0+deb12u1) ...
#20 102.8 Setting up ffmpeg (7:5.1.4-0+deb12u1) ...
#20 102.8 Processing triggers for libc-bin (2.36-9+deb12u6) ...
#20 102.8 Processing triggers for php8.2-cli (8.2.18-1+0~20240422.54+debian12~1.gbp91aa2d) ...
#20 102.8 Processing triggers for php8.2-fpm (8.2.18-1+0~20240422.54+debian12~1.gbp91aa2d) ...
#20 102.8 invoke-rc.d: could not determine current runlevel
#20 102.8 invoke-rc.d: policy-rc.d denied execution of restart.
#20 102.8 NOTICE: Not enabling PHP 8.2 FPM by default.
#20 102.8 NOTICE: To enable PHP 8.2 FPM in Apache2 do:
#20 102.8 NOTICE: a2enmod proxy_fcgi setenvif
#20 102.8 NOTICE: a2enconf php8.2-fpm
#20 102.8 NOTICE: You are seeing this message because you have apache2 package installed.
#20 DONE 103.0s

#21 [web 11/21] RUN echo | sudo mkdir -p /run/php && chmod 777 /run/php
#21 DONE 0.1s

#22 [web 12/21] RUN echo | sudo chmod 777 /run/php/php8.2-fpm.pid
#22 0.153 chmod: cannot access '/run/php/php8.2-fpm.pid': No such file or directory
#22 ERROR: process "/bin/bash -c echo | sudo chmod 777 /run/php/php${PHP_VERSION}-fpm.pid" did not complete successfully: exit code: 1
------
 > [web 12/21] RUN echo | sudo chmod 777 /run/php/php8.2-fpm.pid:
0.153 chmod: cannot access '/run/php/php8.2-fpm.pid': No such file or directory
------
', stderr='failed to solve: process "/bin/bash -c echo | sudo chmod 777 /run/php/php${PHP_VERSION}-fpm.pid" did not complete successfully: exit code: 1'

@Clemchan33
Copy link
Author

Sorry, the ddev debug refresh was really long....
Well, when doing ddev debug refresh without the line you wanted me to add and without deleting the Dockerfile, I got this :

cbrun@FoxFly:~/Docker/toto9$ ddev debug refresh
Rebuilding project images...
Rebuilding web image with `/home/cbrun/.ddev/bin/docker-compose -f /home/cbrun/Docker/toto9/.ddev/.ddev-docker-compose-full.yaml build web --no-cache`
[+] Building 342.2s (15/15) FINISHED                                                                     docker:default
 => [web internal] load build definition from Dockerfile                                                           0.0s
 => => transferring dockerfile: 1.80kB                                                                             0.0s
 => [web internal] load metadata for docker.io/ddev/ddev-webserver:v1.23.0-1                                       0.0s
 => [web internal] load .dockerignore                                                                              0.0s
 => => transferring context: 2B                                                                                    0.0s
 => CACHED [web  1/11] FROM docker.io/ddev/ddev-webserver:v1.23.0-1                                                0.0s
 => [web  2/11] RUN (groupadd --gid 1000 "cbrun" || groupadd "cbrun" || true) && (useradd  -l -m -s "/bin/bash" -  0.3s
 => [web  3/11] RUN export XDEBUG_MODE=off; composer self-update --stable || composer self-update --stable || tru  0.9s
 => [web  4/11] RUN mkdir -p /home/cbrun && chown cbrun /home/cbrun && chmod 600 /home/cbrun/.pgpass               0.4s
 => [web  5/11] RUN chmod 777 /run/php                                                                             0.4s
 => [web  6/11] RUN apt-get update && apt-get upgrade -y                                                         321.9s
 => [web  7/11] RUN sudo apt-get update && sudo apt-get install apt-transport-https                                1.9s
 => [web  8/11] RUN wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo gpg  --dearmor -o /usr  0.5s
 => [web  9/11] RUN echo 'deb [signed-by=/usr/share/keyrings/dart.gpg arch=amd64] https://storage.googleapis.com/  0.5s
 => [web 10/11] RUN apt-get update && apt-get install dart                                                        11.7s
 => [web 11/11] RUN npm install -g sass                                                                            2.2s
 => [web] exporting to image                                                                                       1.4s
 => => exporting layers                                                                                            1.4s
 => => writing image sha256:885d10edef8ddafb548c05e15f80f63e893a88d0a2ba8a5cfa30d2ebf3d89e71                       0.0s
 => => naming to docker.io/ddev/ddev-webserver:v1.23.0-1-toto-built                                               0.0s
Refreshed Docker cache for project toto in 5m42s
 Container ddev-toto-web  Stopped
 Container ddev-toto-web  Removed
 Container ddev-toto-phpmyadmin  Stopped
 Container ddev-toto-phpmyadmin  Removed
 Container ddev-toto-db  Stopped
 Container ddev-toto-db  Removed
 Network ddev-toto_default  Removed
Building project images...
.Project images built in 1s.
 Network ddev-toto_default  Created
 Container ddev-toto-web  Created
 Container ddev-toto-db  Created
 Container ddev-toto-phpmyadmin  Created
 Container ddev-toto-db  Started
 Container ddev-toto-web  Started
 Container ddev-toto-phpmyadmin  Started
Waiting for web/db containers to become ready: [web db]
Failed waiting for web/db containers to become ready: web container failed: log=&{2024-04-26 14:43:06.548239943 +0200 CEST 2024-04-26 14:43:07.076253923 +0200 CEST 1 php-fpm:FATAL Shut down
/var/www/html:OK mailpit:FAILED phpstatus:FAILED }, err=ddev-toto-web container is unhealthy: &{2024-04-26 14:43:06.548239943 +0200 CEST 2024-04-26 14:43:07.076253923 +0200 CEST 1 php-fpm:FATAL Shut down
/var/www/html:OK mailpit:FAILED phpstatus:FAILED }, more info with [
        ddev logs -s web
        docker logs ddev-toto-web
        docker inspect --format "{{ json .State.Health }}" ddev-toto-web | docker run -i --rm ddev/ddev-utilities jq -r
]

And when I try with the line RUN chmod 777 /run/php/php8.1-fpm.pid in it, I got :

cbrun@FoxFly:~/Docker/toto9$ ddev debug refresh
Rebuilding project images...
Rebuilding web image with `/home/cbrun/.ddev/bin/docker-compose -f /home/cbrun/Docker/toto9/.ddev/.ddev-docker-compose-full.yaml build web --no-cache`
[+] Building 322.3s (15/15) FINISHED                                                                                             docker:default
 => [web internal] load build definition from Dockerfile                                                                                   0.0s
 => => transferring dockerfile: 1.84kB                                                                                                     0.0s
 => [web internal] load metadata for docker.io/ddev/ddev-webserver:v1.23.0-1                                                               0.0s
 => [web internal] load .dockerignore                                                                                                      0.0s
 => => transferring context: 2B                                                                                                            0.0s
 => CACHED [web  1/12] FROM docker.io/ddev/ddev-webserver:v1.23.0-1                                                                        0.0s
 => [web  2/12] RUN (groupadd --gid 1000 "cbrun" || groupadd "cbrun" || true) && (useradd  -l -m -s "/bin/bash" --gid "cbrun" --comment '  0.2s
 => [web  3/12] RUN export XDEBUG_MODE=off; composer self-update --stable || composer self-update --stable || true; composer self-update   0.9s
 => [web  4/12] RUN mkdir -p /home/cbrun && chown cbrun /home/cbrun && chmod 600 /home/cbrun/.pgpass                                       0.3s
 => [web  5/12] RUN chmod 777 /run/php                                                                                                     0.4s
 => [web  6/12] RUN apt-get update && apt-get upgrade -y                                                                                 304.5s
 => [web  7/12] RUN sudo apt-get update && sudo apt-get install apt-transport-https                                                        2.4s
 => [web  8/12] RUN wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo gpg  --dearmor -o /usr/share/keyrings/dart.gpg  0.6s
 => [web  9/12] RUN echo 'deb [signed-by=/usr/share/keyrings/dart.gpg arch=amd64] https://storage.googleapis.com/download.dartlang.org/li  0.5s
 => [web 10/12] RUN apt-get update && apt-get install dart                                                                                10.3s
 => [web 11/12] RUN npm install -g sass                                                                                                    1.8s
 => ERROR [web 12/12] RUN chmod 777 /run/php/php8.2-fpm.pid                                                                                0.4s
------
 > [web 12/12] RUN chmod 777 /run/php/php8.2-fpm.pid:
0.342 chmod: cannot access '/run/php/php8.2-fpm.pid': No such file or directory
------
failed to solve: process "/bin/bash -c chmod 777 /run/php/php8.2-fpm.pid" did not complete successfully: exit code: 1
Failed to execute docker-compose -f exit status 17 build web --no-cache: %!v(MISSING)

And finally, this is what I got when I do it without the Dockerfile :

cbrun@FoxFly:~/Docker/toto9$ ddev debug refresh
Rebuilding project images...
Rebuilding web image with `/home/cbrun/.ddev/bin/docker-compose -f /home/cbrun/Docker/toto9/.ddev/.ddev-docker-compose-full.yaml build web --no-cache`
[+] Building 2.0s (9/9) FINISHED                                                                                                 docker:default
 => [web internal] load build definition from Dockerfile                                                                                   0.0s
 => => transferring dockerfile: 1.02kB                                                                                                     0.0s
 => [web internal] load metadata for docker.io/ddev/ddev-webserver:v1.23.0-1                                                               0.0s
 => [web internal] load .dockerignore                                                                                                      0.0s
 => => transferring context: 2B                                                                                                            0.0s
 => CACHED [web 1/5] FROM docker.io/ddev/ddev-webserver:v1.23.0-1                                                                          0.0s
 => [web 2/5] RUN (groupadd --gid 1000 "cbrun" || groupadd "cbrun" || true) && (useradd  -l -m -s "/bin/bash" --gid "cbrun" --comment ''   0.3s
 => [web 3/5] RUN export XDEBUG_MODE=off; composer self-update --stable || composer self-update --stable || true; composer self-update --  0.9s
 => [web 4/5] RUN mkdir -p /home/cbrun && chown cbrun /home/cbrun && chmod 600 /home/cbrun/.pgpass                                         0.3s
 => [web 5/5] RUN chmod 777 /run/php                                                                                                       0.4s
 => [web] exporting to image                                                                                                               0.0s
 => => exporting layers                                                                                                                    0.0s
 => => writing image sha256:d76996aec271be38304039212bb8825ccd70910f72d255d62416c36e50973e2a                                               0.0s
 => => naming to docker.io/ddev/ddev-webserver:v1.23.0-1-toto-built                                                                       0.0s
Refreshed Docker cache for project toto in 2s
 Container ddev-toto-web  Stopped
 Container ddev-toto-web  Removed
 Container ddev-toto-phpmyadmin  Stopped
 Container ddev-toto-phpmyadmin  Removed
 Container ddev-toto-db  Stopped
 Container ddev-toto-db  Removed
 Network ddev-toto_default  Removed
Building project images...
.Project images built in 1s.
 Network ddev-toto_default  Created
 Container ddev-toto-db  Created
 Container ddev-toto-web  Created
 Container ddev-toto-phpmyadmin  Created
 Container ddev-toto-db  Started
 Container ddev-toto-phpmyadmin  Started
 Container ddev-toto-web  Started
Waiting for web/db containers to become ready: [web db]
Starting ddev-router if necessary...
 Container ddev-router  Created
 Container ddev-router  Started
Waiting for additional project containers to become ready...
All project containers are now ready.
settings.ddev.php already exists and is managed by the user.

So we can say it works when deleting the Dockerfile! Thank you @rfay !

And sorry @stasadev but when you look my ddev debug refresh, you can see there is already a RUN chmod 777 /run/php but it doesn't help on it.... :/

@rfay
Copy link
Member

rfay commented Apr 26, 2024

The RUN chmod 777 /run/php is in the wrong place for your situation (needs to be at the end). That's why @stasadev fixed it in HEAD. Please test in HEAD or do what he suggested.

@stasadev
Copy link
Member

when you look my ddev debug refresh, you can see there is already a RUN chmod 777 /run/php but it doesn't help on it.... :/

Yes, I know that, you simply need to add:

RUN chmod 777 /run/php

to the end of your Dockerfile without any echo | sudo. Only this one line, do not mix it up with other suggestions.

@bhanu951
Copy link

ddev debug refresh
Rebuilding project images...
Rebuilding web image with `/Users/fname.lname/.ddev/bin/docker-compose -f /Users/fname.lname/Projects/drupal10/.ddev/.ddev-docker-compose-full.yaml build web --no-cache`
[+] Building 154.2s (16/25)                                                                                                           docker:default
 => [web internal] load build definition from Dockerfile                                                                                        0.0s
 => => transferring dockerfile: 3.88kB                                                                                                          0.0s
 => [web internal] load metadata for docker.io/ddev/ddev-webserver:v1.23.0-1                                                                    0.0s
 => [web internal] load .dockerignore                                                                                                           0.0s
 => => transferring context: 2B                                                                                                                 0.0s
 => CACHED [web  1/21] FROM docker.io/ddev/ddev-webserver:v1.23.0-1                                                                             0.0s
 => [web internal] load build context                                                                                                           0.0s
 => => transferring context: 790B                                                                                                               0.0s
 => [web  2/21] RUN (groupadd --gid 826136866 "fname.lname" || groupadd "fname.lname" || true) && (useradd  -l -m -s "/bin/bash" --g  0.1s
 => [web  3/21] RUN export XDEBUG_MODE=off; composer self-update --stable || composer self-update --stable || true; composer self-update --2 |  7.6s
 => [web  4/21] RUN mkdir -p /home/fname.lname && chown fname.lname /home/fname.lname && chmod 600 /home/fname.lname/.pgpa  0.1s
 => [web  5/21] RUN npm install -g n                                                                                                            1.8s
 => [web  6/21] RUN n install 16 && ln -sf /usr/local/bin/node /usr/local/bin/nodejs                                                           56.0s
 => [web  7/21] RUN chmod 777 /run/php                                                                                                          0.1s
 => [web  8/21] RUN disable_xdebug                                                                                                              0.2s
 => [web  9/21] RUN if [ ! -f /usr/bin/sed ]; then ln -sf /bin/sed /usr/bin/sed; fi                                                             0.1s
 => [web 10/21] RUN (apt-get update || true) && DEBIAN_FRONTEND=noninteractive apt-get install -y -o Dpkg::Options::="--force-confnew" --no-i  87.9s
 => [web 11/21] RUN echo | sudo mkdir -p /run/php && chmod 777 /run/php                                                                         0.1s
 => ERROR [web 12/21] RUN echo | sudo chmod 777 /run/php/php8.2-fpm.pid                                                                         0.2s
------
 > [web 12/21] RUN echo | sudo chmod 777 /run/php/php8.2-fpm.pid:
0.153 chmod: cannot access '/run/php/php8.2-fpm.pid': No such file or directory
------
failed to solve: process "/bin/bash -c echo | sudo chmod 777 /run/php/php${PHP_VERSION}-fpm.pid" did not complete successfully: exit code: 1
Failed to execute docker-compose -f exit status 17 build web --no-cache: %!v(MISSING)

@stasadev
Copy link
Member

stasadev commented Apr 26, 2024

@bhanu951, please re-read what is written above, revert your Dockerfile to its original state, i.e. remove this:

RUN echo | sudo mkdir -p /run/php && chmod 777 /run/php
RUN echo | sudo chmod 777 /run/php/php${PHP_VERSION}-fpm.pid

and add this at the end of your Dockerfile:

RUN chmod 777 /run/php

@bhanu951
Copy link

@stasadev I ran it before your comment.

Now I followed your instructions and can confirm it works.

Adding RUN chmod 777 /run/php at the end of your Dockerfile without any echo | sudo works.

Thank you @rfay and @stasadev for looking into it and helping out.

@Clemchan33
Copy link
Author

Clemchan33 commented Apr 26, 2024

Yes, I know that, you simply need to add:

RUN chmod 777 /run/php
to the end of your Dockerfile without any echo | sudo. Only this one line, do not mix it up with other suggestions.

alright, I've tried what you asked and it worked too like you can see in this ddev debug refresh :

cbrun@FoxFly:~/Docker/toto9$ ddev debug refresh
Rebuilding project images...
Rebuilding web image with `/home/cbrun/.ddev/bin/docker-compose -f /home/cbrun/Docker/toto9/.ddev/.ddev-docker-compose-full.yaml build web --no-cache`
[+] Building 326.8s (16/16) FINISHED                                                                                             docker:default
 => [web internal] load build definition from Dockerfile                                                                                   0.0s
 => => transferring dockerfile: 1.83kB                                                                                                     0.0s
 => [web internal] load metadata for docker.io/ddev/ddev-webserver:v1.23.0-1                                                               0.0s
 => [web internal] load .dockerignore                                                                                                      0.0s
 => => transferring context: 2B                                                                                                            0.0s
 => CACHED [web  1/12] FROM docker.io/ddev/ddev-webserver:v1.23.0-1                                                                        0.0s
 => [web  2/12] RUN (groupadd --gid 1000 "cbrun" || groupadd "cbrun" || true) && (useradd  -l -m -s "/bin/bash" --gid "cbrun" --comment '  0.3s
 => [web  3/12] RUN export XDEBUG_MODE=off; composer self-update --stable || composer self-update --stable || true; composer self-update   0.9s
 => [web  4/12] RUN mkdir -p /home/cbrun && chown cbrun /home/cbrun && chmod 600 /home/cbrun/.pgpass                                       0.4s
 => [web  5/12] RUN chmod 777 /run/php                                                                                                     0.4s
 => [web  6/12] RUN apt-get update && apt-get upgrade -y                                                                                 305.1s
 => [web  7/12] RUN sudo apt-get update && sudo apt-get install apt-transport-https                                                        2.4s
 => [web  8/12] RUN wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo gpg  --dearmor -o /usr/share/keyrings/dart.gpg  0.6s
 => [web  9/12] RUN echo 'deb [signed-by=/usr/share/keyrings/dart.gpg arch=amd64] https://storage.googleapis.com/download.dartlang.org/li  0.4s
 => [web 10/12] RUN apt-get update && apt-get install dart                                                                                13.7s
 => [web 11/12] RUN npm install -g sass                                                                                                    1.3s
 => [web 12/12] RUN chmod 777 /run/php                                                                                                     0.4s
 => [web] exporting to image                                                                                                               1.1s
 => => exporting layers                                                                                                                    1.0s
 => => writing image sha256:76aec4bf1352fd55a4fa2543ee0d91c24252f40fa17032bac54c28c82ece7232                                               0.0s
 => => naming to docker.io/ddev/ddev-webserver:v1.23.0-1-toto-built                                                                       0.0s
Refreshed Docker cache for project toto in 5m27s
 Container ddev-toto-phpmyadmin  Stopped
 Container ddev-toto-db  Stopped
 Container ddev-toto-web  Stopped
 Container ddev-toto-web  Stopped
 Container ddev-toto-phpmyadmin  Stopped
 Container ddev-toto-phpmyadmin  Removed
 Container ddev-toto-db  Stopped
 Container ddev-toto-db  Removed
 Container ddev-toto-web  Removed
 Network ddev-toto_default  Removed
Building project images...
.Project images built in 1s.
 Network ddev-toto_default  Created
 Container ddev-toto-web  Created
 Container ddev-toto-db  Created
 Container ddev-toto-phpmyadmin  Created
 Container ddev-toto-web  Started
 Container ddev-toto-db  Started
 Container ddev-toto-phpmyadmin  Started
Waiting for web/db containers to become ready: [web db]
Starting ddev-router if necessary...
 Container ddev-router  Created
 Container ddev-router  Started
Waiting for additional project containers to become ready...
All project containers are now ready.
settings.ddev.php already exists and is managed by the user.

But I don't understand why with the update of ddev, we now have to add chmod 777 /run/php in the end of the Dockerfile while we didn't have to it before?

@stasadev
Copy link
Member

why with the update of ddev, we now have to chmod 777 /run/php while we didn't have to before?

Because we switched from Debian 11 Bullseye to Debian 12 Bookworm in DDEV v1.23.0, something changed upstream (quite a lot), and some php-* packages can break access to /run/php folder.

You don't need to add chmod if you add packages to webimage_extra_packages in .ddev/config.yaml, but you need to add it if some PHP package, that you install yourself in the custom Dockerfile, breaks persmissions on /run/php.

It will not be needed in the next DDEV release.

@Clemchan33
Copy link
Author

Clemchan33 commented Apr 26, 2024

Ok, I understand better.

Great works @stasadev and @rfay and thank you for your help ;)

So for people who want to find a solution for this problem, just do what @stasadev advise.
I will now close this issue because it's solved.

Bye.

@rfay rfay pinned this issue Apr 26, 2024
@rfay
Copy link
Member

rfay commented Apr 26, 2024

Pinning this and updating title, since obviously it will happen to others with custom Dockerfiles until v1.23.1 comes out.

@rfay rfay changed the title On starting the web container I've got : ERROR: Unable to create the PID file (/run/php/php8.1-fpm.pid).: Permission denied (13) ERROR: Unable to create the PID file (/run/php/php8.1-fpm.pid).: Permission denied (13) (with custom Dockerfile/webimage_extra_packages) Apr 26, 2024
@rfay rfay changed the title ERROR: Unable to create the PID file (/run/php/php8.1-fpm.pid).: Permission denied (13) (with custom Dockerfile/webimage_extra_packages) Unable to create the PID file (/run/php/php8.1-fpm.pid).: Permission denied (13) (with custom Dockerfile/webimage_extra_packages) Apr 26, 2024
@rfay
Copy link
Member

rfay commented Apr 26, 2024

Thanks for solving this even before it was noticed @stasadev . Sorry I didn't understand the implications when offering support here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants