thiagoelg commented on code in PR #2225:
URL: 
https://github.com/apache/incubator-kie-tools/pull/2225#discussion_r1557668379


##########
packages/kie-sandbox-image/Containerfile:
##########
@@ -17,17 +17,19 @@
 
 FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/ubi-minimal:9.3
 
+ARG KIE_SANDBOX_DEFAULT_PORT=8080
+
 COPY entrypoint.sh dist-dev/image-env-to-json-standalone 
dist-dev/EnvJson.schema.json /tmp/
 
 RUN microdnf --disableplugin=subscription-manager -y install 
httpd-2.4.57-5.el9.x86_64 \
   && microdnf --disableplugin=subscription-manager clean all \
   && echo "Mutex posixsem" >> /etc/httpd/conf/httpd.conf \
-  && sed -i -e 's/Listen 80/Listen 8080/' /etc/httpd/conf/httpd.conf \
-  && sed -i -e 's/#ServerName www.example.com:80/ServerName 127.0.0.1:8080/' 
/etc/httpd/conf/httpd.conf \
-  && sed -i -e "/ServerName 127.0.0.1:8080/aHeader set Content-Security-Policy 
\"frame-ancestors 'self';\"" /etc/httpd/conf/httpd.conf \
-  && sed -i -e 's/Options Indexes FollowSymLinks/Options -Indexes 
+FollowSymLinks/' /etc/httpd/conf/httpd.conf \
-  && sed -i '$ a ServerTokens Prod' /etc/httpd/conf/httpd.conf \
-  && sed -i '$ a ServerSignature Off' /etc/httpd/conf/httpd.conf \
+  && sed -i "s/Listen 80/Listen $KIE_SANDBOX_DEFAULT_PORT/g" 
/etc/httpd/conf/httpd.conf \
+  && sed -i "s/#ServerName www.example.com:80/ServerName 
www.example.com:$KIE_SANDBOX_DEFAULT_PORT/g" /etc/httpd/conf/httpd.conf \

Review Comment:
   ```suggestion
     && sed -i "s/#ServerName www.example.com:80/ServerName 
127.0.0.1:$KIE_SANDBOX_DEFAULT_PORT/g" /etc/httpd/conf/httpd.conf \
   ```
   
   Without this the next `sed` command won't find a match.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to