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
Performing a yum -y update before installing additional packages breaks httpd
Issues:
1.) Permissions error when updating httpd.conf
STEP 9/10: RUN sed -i "s/^Listen 0.0.0.0:8080/Listen 0.0.0.0:8081/" /etc/httpd/conf/httpd.conf
sed: couldn't open temporary file /etc/httpd/conf/sedTWjtCG: Permission denied
Error: building at STEP "RUN sed -i "s/^Listen 0.0.0.0:8080/Listen 0.0.0.0:8081/" /etc/httpd/conf/httpd.conf": while running runtime: exit status 4
2.) Permission error when starting the container /usr/libexec/s2i/run (at httpd -D FOREGROUND)
(13)Permission denied: AH00058: Error retrieving pid file run/httpd.pid
AH00059: Remove it before continuing if it is corrupted.
Workaround:
omit yum -y update command
Reproducer
1.)
Dockerfile ->
FROM registry.access.redhat.com/ubi9/php-81:9.5
USER 0
RUN yum -y update && \
yum -y install git && \
yum clean all
USER 1001
RUN mkdir -p /tmp/src/public
RUN echo '<?php\n\necho "Hello World!";\n' > /tmp/src/public/index.php
ENV DOCUMENTROOT=/public
RUN /usr/libexec/s2i/assemble
# permission error here
RUN sed -i "s/^Listen 0.0.0.0:8080/Listen 0.0.0.0:8081/" /etc/httpd/conf/httpd.conf
CMD /usr/libexec/s2i/run
bash ->
podman build -t test -f Dockerfile .
..
...
STEP 9/10: RUN sed -i "s/^Listen 0.0.0.0:8080/Listen 0.0.0.0:8081/" /etc/httpd/conf/httpd.conf
sed: couldn't open temporary file /etc/httpd/conf/sedTWjtCG: Permission deniedError: building at STEP "RUN sed -i "s/^Listen 0.0.0.0:8080/Listen 0.0.0.0:8081/" /etc/httpd/conf/httpd.conf": while running runtime: exit status 4
2.)
Dockerfile ->
FROM registry.access.redhat.com/ubi9/php-81:9.5
USER 0
RUN yum -y update && \
yum -y install git && \
yum clean all
USER 1001
RUN mkdir -p /tmp/src/public
RUN echo '<?php\n\necho "Hello World!";\n' > /tmp/src/public/index.php
ENV DOCUMENTROOT=/public
RUN /usr/libexec/s2i/assemble
# run error
CMD /usr/libexec/s2i/run
bash ->
podman build -t test.
podman run test
..
...
(13)Permission denied: AH00058: Error retrieving pid file run/httpd.pid
AH00059: Remove it before continuing if it is corrupted.
The text was updated successfully, but these errors were encountered:
Container platform
Podman/Docker
Version
registry.access.redhat.com/ubi9/php-81:9.5
OS version of the container image
el9
Bugzilla, Jira
No response
Description
Performing a
yum -y update
before installing additional packages breaks httpdIssues:
1.) Permissions error when updating
httpd.conf
2.) Permission error when starting the container
/usr/libexec/s2i/run
(athttpd -D FOREGROUND
)Workaround:
omit
yum -y update
commandReproducer
1.)
Dockerfile ->
bash ->
2.)
Dockerfile ->
bash ->
The text was updated successfully, but these errors were encountered: