sachiek
(Sachiek)
May 20, 2021, 11:34am
1
Hi,
I am trying to use httpd image.
So here with this image need to use siteminder webagent.
Since siteminder webagent require to run create a file before apache start - I tried using docker exec.
But since apache always restarting whenever I stop it, it is not possible.
Any clue how to proceed?
terpz
(Martin Terp)
May 20, 2021, 11:59am
3
Maybe create your own image from the one you’re using and add/create the file?
Then the file will be there when you start the container
sachiek
(Sachiek)
May 20, 2021, 12:35pm
4
Sorry I am not expert in creating this image.
Please can let me know if any example.
This is from my docker compose now.
FROM httpd:2.4.35
RUN { \
echo ‘IncludeOptional conf.d/*.conf’; \
} >> /usr/local/apache2/conf/httpd.conf \
&& mkdir /usr/local/apache2/conf.d
#version and dist path passed in via --build-arg
ARG OUT_FOLDER
ARG HTDOC_FOLDER
COPY ./dist/${OUT_FOLDER}/ /usr/local/apache2/htdocs/${HTDOC_FOLDER}
terpz
(Martin Terp)
May 20, 2021, 12:48pm
5
Your RUN command is wrong:
use this instead
RUN echo "IncludeOptional conf.d/*.conf;" >> /usr/local/apache2/conf/httpd.conf
sachiek
(Sachiek)
May 20, 2021, 1:47pm
6
Sorry, the should be like as below
“run this 1st script”
“Then use this httpd image”.
So the minute httpd with “run” it is trying to start apache.