serversideup / docker-php

🐳 Production-ready Docker images for PHP. Optimized for Laravel, WordPress, and more!
https://serversideup.net/open-source/docker-php/
GNU General Public License v3.0
1.65k stars 108 forks source link

Custom start up script not executing #371

Closed rlvillacarlos closed 2 months ago

rlvillacarlos commented 2 months ago

Affected Docker Images

php:8.3-fpm-nginx

Current Behavior

Custom script is not executing.

Expected Behavior

Following the instructions in https://serversideup.net/open-source/docker-php/docs/customizing-the-image/adding-your-own-start-up-scripts#example-create-a-custom-entrypoint-script, the custom script should output the test message in the console.

image

Steps To Reproduce

  1. Create a custom shellscript in the entrypoint.d directory
  2. Create custom Dockerfile.
  3. Use the Dockerfile in a docker-compose file
  4. Run docker compose up

Anything else?

No response

jaydrogers commented 2 months ago

Your example is missing the parts from "Additional Steps For FPM-Apache & FPM-NGINX (S6 Overlay based images)"

Since you're using FPM-NGINX, that's an S6 Overlay image... meaning you need to call docker-php-serversideup-s6-init after you copy the scripts over.