-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Where to override ENTRYPOINT ? #27
Comments
I can insert what I do in some other images to accommodate for "custom scripts" The premise would work like this:
Inside that Script it could look like so:
This would execute the script before nginx/php-fpm runs accomplishing what you are after.. I do have to watch out though as my dependent images also have this snippet for Perhaps I can include an environment variable that can call a specific script somewhere on the filesystem as such:
|
Yes PHP_FPM_POST_SCRIPT would be brilliant! I'm sure people would use it since most articles i read recommend those types of scripts. We'll try your first method out for now and look for any more official changes if they're ever pushed. Thanks for everything @tiredofit !!! |
Thanks for the sponsor :) I just added the following to the base images (alpine and debian) So lots and lots of flexibility here on which way you want to use it. I included these multiples here just in the event that a child image clobbers some of the parent images custom environment variables if you are looking to use the image for complex stuff. I can already see this working in so many cases for my environments. Should be available for you by tomorrow 8am PDT - Github build process is slower than I'd like and I have to remind myself to be around to trigger the next images builds after the first ones build and its now the end of my office day. Let me know how it works out. FWIW - If you are doing some laravel work I have some real interesting stuff in some private images that you may want to take advantage of in terms of cache and config busting and also recompiling assets in a "development" style container. One simply needs to flip an environment variable from |
Wow you're awesome! First off - yes i'll definitely look for the changes tomorrow! Second - i think i'd definitely be interested IF it would work well with docker-compose and laravel sail, since that's what I've gotten used to. BTW - How do you keep up with so many repos? |
I think it should work with sail - Basically it is a series of extra scripts that run watchers when files are updated (css mostly) to recompile if you are doing things with Tailwind. Note, I know little to nothing of laravel other than maintain a few images and think its a pretty elegant framework, so I'll have to ask a couple people to find out more, but I'll definitely put this together and integrate it into the image in the near future - it may turn into it's own "laravel" image just to keep things clean but still relying on all the same functionality at this one. Lets see. As for the amount of images, I question that myself. Things sort of grew with the first one |
This could be said of huge parts of every moment of my life. Also, and I'm just guessing here, but since laravel is super popular, and a lot of developers are just jumping into the docker ecosystem, you might find an audience there. I'd definitely recommend naming it laravel for search purposes if nothing else. |
I'm closing this since we are able to confirm that PHP_FPM_POST_INIT_SCRIPT is working great! Thanks! |
This is a really great project (as are all your docker builds). Thanks!
I realize this question might seem intuitive, but I would like to override the ENTRYPOINT.
I'd like to add a few laravel specific php commands ('php artisan config:cache', etc) before whatever command is provisioning php/nginx.
What is in the current entrypoint or cmd that is being used?
Thanks in advance!
The text was updated successfully, but these errors were encountered: