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

Adding a Script in "./httpd-pre-init" does not work as expected #213

Closed
dirkrydvan opened this issue May 24, 2018 · 2 comments
Closed

Adding a Script in "./httpd-pre-init" does not work as expected #213

dirkrydvan opened this issue May 24, 2018 · 2 comments

Comments

@dirkrydvan
Copy link

dirkrydvan commented May 24, 2018

Hello,

at https://github.com/sclorg/s2i-php-container/blob/master/7.1/README.md is explained, how to extend the image with a Script that get started before httpd starts.

I add a skript in the httpd-pre-init subfolder directly at the git source root folder.
And there I placed a example.sh script.

I expected, that this script get started with the resulting container. But it wont be started.
The script exists inside the container:

bash# oc rsh containername
sh-4.2$ pwd
/opt/app-root/src
sh-4.2$ ls -al ./httpd-pre-init
total 12
drwxrwxr-x.  2 default root   46 May 24 10:26 .
drwxrwxr-x. 16 default root 4096 May 24 11:15 ..
-rw-rw-r--.  1 default root  509 May 24 10:26 example.sh
sh-4.2$

It seams, that the "run-httpd" script from the sclorg apache 2.4 container will not used/not exist:

sh-4.2$ find / -name "run-httpd" 2>/dev/null
sh-4.2$ find / -name "pre-init" 2>/dev/null
/usr/share/container-scripts/php/pre-init
sh-4.2$ ls -al /usr/share/container-scripts/php/pre-init
total 0
drwxr-xr-x. 2 root root  6 May  9 12:08 .
drwxr-xr-x. 6 root root 94 May  9 12:08 ..
sh-4.2$

Maybe some for pre-start or is missing here to use function process_extending_files() from common.sh
https://github.com/sclorg/s2i-php-container/tree/master/7.0/root/usr/share/container-scripts/php

What is necessary, that this script get started once inside the container?

Many Thanks advance

@dirkrydvan dirkrydvan changed the title Adding a Script in "./httpd-pre-init" does not work a expected Adding a Script in "./httpd-pre-init" does not work as expected May 24, 2018
@omron93
Copy link
Contributor

omron93 commented May 29, 2018

Thanks for reporting this issue. There is inconsistency in what is in the code and what is in the readme.

README describes ./httpd-cfg , ./httpd-pre-init , ./httpd-ssl folders. But in code ./httpd-cfg , ./php-pre-start , ./httpd-ssl , ./php-post-assemble folders are used.
@hhorak You introduced the change. Which naming we want use?

@dirkrydvan So hotfix for this issue is to use php-pre-start folder instead of httpd-pre-init. But be prepared that a resolution of this issue can change naming.

@hhorak
Copy link
Member

hhorak commented May 29, 2018

@omron93 Yeah, naming is never easy :) my thinking behind this was to use the same entrypoint names where I'd expect the same content/use case for httpd and php container image -- that's the httpd-ssl a httpd-cfg case. However, my expectation for content/use case for post-assemble and pre-start entrypoints would be different in case of php, than in case of httpd container image; therefore different name. Anyway, my intention was what is in the code, the README is wrong in this case.

omron93 pushed a commit to omron93/s2i-php-container that referenced this issue May 29, 2018
omron93 pushed a commit to omron93/s2i-php-container that referenced this issue May 29, 2018
@omron93 omron93 mentioned this issue May 29, 2018
omron93 pushed a commit to omron93/s2i-php-container that referenced this issue May 29, 2018
omron93 pushed a commit to omron93/s2i-php-container that referenced this issue May 29, 2018
omron93 pushed a commit to omron93/s2i-php-container that referenced this issue Jun 5, 2018
omron93 pushed a commit that referenced this issue Jun 5, 2018
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

3 participants