-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add template support for "--enable-debug" flag #1364
Conversation
I believe that #1280 is still relevant even with this, right? |
Nope, the generated |
An example full generated diff --git a/8.1/bullseye/cli/Dockerfile b/8.1/bullseye/cli/Dockerfile
index 3609c4f2..954ceae5 100644
--- a/8.1/bullseye/cli/Dockerfile
+++ b/8.1/bullseye/cli/Dockerfile
@@ -174,18 +174,11 @@ RUN set -eux; \
\
# https://github.com/docker-library/php/pull/939#issuecomment-730501748
--enable-embed \
+ --enable-debug \
; \
make -j "$(nproc)"; \
find -type f -name '*.a' -delete; \
make install; \
- find \
- /usr/local \
- -type f \
- -perm '/0111' \
- -exec sh -euxc ' \
- strip --strip-all "$@" || : \
- ' -- '{}' + \
- ; \
make clean; \
\
# https://github.com/docker-library/php/issues/692 (copy default example "php.ini" files somewhere easily discoverable) |
This comment was marked as spam.
This comment was marked as spam.
This looks great. We'd like to be able to build a variant of the image without stripping symbols. This is especially useful when trying to debug core dumps. With the stripped binary it's very difficult to debug a core dump meaningfully. However, it seems in this PR this is tied to the If that's the use-case this PR is trying to address, I wanted to highlight it as a concern. |
Yeah... I wasn't aware that |
On that topic, for better backtraces adding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to merge this -- I'm still really concerned about it, because we will not be testing it, especially over time, and we cannot guarantee it will continue to work properly in the future, but I hope the comments in the template make that clear enough.
Changes: - docker-library/php@22ecd27e: Update 8.3-rc - docker-library/php@9f3c89c9: Update 8.2-rc - docker-library/php@23b4a3f1: Update 8.1-rc - docker-library/php@5fa6bfe5: Update 8.1 to 8.1.27 - docker-library/php@02212e33: Merge pull request docker-library/php#1364 from infosiftr/debug
Changes: - docker-library/php@aacb4822: Update 8.3 to 8.3.1 - docker-library/php@ce5371b4: Update 8.2 to 8.2.14 - docker-library/php@22ecd27e: Update 8.3-rc - docker-library/php@9f3c89c9: Update 8.2-rc - docker-library/php@23b4a3f1: Update 8.1-rc - docker-library/php@5fa6bfe5: Update 8.1 to 8.1.27 - docker-library/php@02212e33: Merge pull request docker-library/php#1364 from infosiftr/debug
Changes: - docker-library/php@aacb4822: Update 8.3 to 8.3.1 - docker-library/php@ce5371b4: Update 8.2 to 8.2.14 - docker-library/php@22ecd27e: Update 8.3-rc - docker-library/php@9f3c89c9: Update 8.2-rc - docker-library/php@23b4a3f1: Update 8.1-rc - docker-library/php@5fa6bfe5: Update 8.1 to 8.1.27 - docker-library/php@02212e33: Merge pull request docker-library/php#1364 from infosiftr/debug
Changes: - docker-library/php@aacb4822: Update 8.3 to 8.3.1 - docker-library/php@ce5371b4: Update 8.2 to 8.2.14 - docker-library/php@22ecd27e: Update 8.3-rc - docker-library/php@9f3c89c9: Update 8.2-rc - docker-library/php@23b4a3f1: Update 8.1-rc - docker-library/php@5fa6bfe5: Update 8.1 to 8.1.27 - docker-library/php@02212e33: Merge pull request docker-library/php#1364 from infosiftr/debug
It is worth mentioning, that the image built with
To fix this run
Inside the container (or make it the part of the building process). After extraction
|
This will allow power users to generate their own PHP Dockerfiles with debug enabled. This is explicitly written to not change the regular versions of the Dockerfiles (i.e. running
./apply-templates.sh
will result in no change). I have build tested one or two versions and they seem to work:To regenerate all the Dockerfiles with debug enabled (
bash
,jq
,gawk
, andwget
are required to run it):Alternative to #1287 and #1280.
Closes #1287
Closes #1280