You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It will be useful when investigating PHP segmentation. For now, we have to build a custom image for this purpose. What do you think about it?
Reacted by Santiago M. Mola, Marc Bennewitz, Philipp Reddigau, Alberts S, lostsnow, Torrey Tsui, vike2000, Laurent Bassin, Bruce Weirdan, Matt Foxx and 1 more
Hello, since the debug images from @csandanov are no longer maintained, I'd like to again ask about the possibility of having official ones.
The latest reason against it I found is this comment from @tianon about already long build times.
I fail to understand why exactly it's an issue. If you properly prioritize the tasks and have the non-debug images built and published first (since admittedly the debug images are less important), longer build time shouldn't really matter in my opinion.
If you properly prioritize the tasks and have the non-debug images built and published first (since admittedly the debug images are less important)
It is not just the php image that would be slowed down by more php images, but any other images queued to build as well.
The build system is not designed to handle special prioritizing of tags within one image repo over other tags in the same repo (or even across image repos). The only ordering of builds is dependency based (FROM). Within a single image repo (like php), tags are ordered only if there is an image dependency otherwise the order of the library/php file is the order that they are built. Builds at this level only push once all tags are built and only push to an architecture specific namespace on Docker Hub (like amd64/php and arm64v8/php).
Since each architecture builds at differing speeds, a separate job called put-shared eventually combines the tags from different architectures to create the multi-architecture manifest found at the main "library" namespace for the image (php on Docker Hub)
The debug symbols don't even need to be included in the images; Debian provides their debug symbols in separate -dbgsym packages so that you can install these debug packages only when you actually need them. The build ID is used to identify the correct file that contains the debug symbols for a specific binary; the file is AFAIK generated with objcopy by the dh_strip debhelper build tool:
The build process of the PHP docker images could generate these debug files and e.g. host them on a web server, where people could download them as needed.
Activity
phy25 commentedon Aug 27, 2019
Duplicate of #709, #530.
axot commentedon Aug 30, 2019
There are risks to enable
--enable-debug, some pecl extensions may get a problem with this. My suggestion is just using-g -O2.tianon commentedon Sep 5, 2019
Adding
-gwouldn't help because we explicitlystripeverything post-build:php/Dockerfile-debian.template
Line 183 in d367f7f
It would be interesting/useful to add something like
du -hs /usr/localbefore/after that line (and adding-gtoPHP_CFLAGS).axot commentedon Sep 8, 2019
Yes, In my local(alpine php-fpm) single php binary increased from 15M to 51M, the total size will increase 36*3 = 108M.
HycarlDev commentedon Dec 26, 2019
can't we just remove the
stripand add the-gto it?enumag commentedon Dec 17, 2020
Hello, since the debug images from @csandanov are no longer maintained, I'd like to again ask about the possibility of having official ones.
The latest reason against it I found is this comment from @tianon about already long build times.
I fail to understand why exactly it's an issue. If you properly prioritize the tasks and have the non-debug images built and published first (since admittedly the debug images are less important), longer build time shouldn't really matter in my opinion.
So what's the problem?
yosifkit commentedon Apr 9, 2021
It is not just the
phpimage that would be slowed down by morephpimages, but any other images queued to build as well.The build system is not designed to handle special prioritizing of tags within one image repo over other tags in the same repo (or even across image repos). The only ordering of builds is dependency based (
FROM). Within a single image repo (likephp), tags are ordered only if there is an image dependency otherwise the order of thelibrary/phpfile is the order that they are built. Builds at this level only push once all tags are built and only push to an architecture specific namespace on Docker Hub (like amd64/php and arm64v8/php).Since each architecture builds at differing speeds, a separate job called
put-sharedeventually combines the tags from different architectures to create the multi-architecture manifest found at the main "library" namespace for the image (phpon Docker Hub)See https://github.com/docker-library/oi-janky-groovy for the groovy generators that create the jobs. See also our FAQ repo: https://github.com/docker-library/faq#an-images-source-changed-in-git-now-what
martinvonwittich commentedon Oct 6, 2022
Debug symbols would be extremely useful for the ability to attach to running PHP instances with
gdb -p <pid>and to runzbacktraceas provided by PHP's php-src/.gdbinit to get a PHP stack trace. Here is an example how to use it: https://reverseengineering.stackexchange.com/questions/9558/how-to-get-current-php-function-name-in-gdbThe debug symbols don't even need to be included in the images; Debian provides their debug symbols in separate
-dbgsympackages so that you can install these debug packages only when you actually need them. The build ID is used to identify the correct file that contains the debug symbols for a specific binary; the file is AFAIK generated withobjcopyby thedh_stripdebhelper build tool:The build process of the PHP docker images could generate these debug files and e.g. host them on a web server, where people could download them as needed.
tianon commentedon Dec 20, 2023
Closing via #1364 (which is as close as we plan to get to this)