Skip to content

Commit 098327a

Browse files
author
SUSE Update Bot
committed
Test build for #2934
1 parent f030381 commit 098327a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

nginx-image/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,14 @@ LABEL org.opencontainers.image.base.digest="%BASE_DIGEST%"
5151
LABEL io.artifacthub.package.readme-url="%SOURCEURL_WITH(README.md)%"
5252
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
5353
CMD ["nginx", "-g", "daemon off;"]
54-
EXPOSE 80/tcp
54+
EXPOSE 8080/tcp
5555
# sanity check that the version from the tag is equal to the version of nginx that we expect
5656
RUN set -euo pipefail; \
5757
[ "$(rpm -q --qf '%{version}' nginx | \
5858
cut -d '.' -f -2)" = "1.21" ]
59+
# Modify the default Nginx config to listen on port 8080 and PID file location to a writable path
60+
RUN set -euo pipefail; sed -i 's/listen *80;/listen 8080;/g' /etc/nginx/nginx.conf &&\
61+
sed -i 's|#pid /run/nginx.pid;|pid /tmp/nginx.pid;|' /etc/nginx/nginx.conf
5962
RUN set -euo pipefail; mkdir /docker-entrypoint.d
6063
COPY [1-3]0-*.sh /docker-entrypoint.d/
6164
COPY docker-entrypoint.sh /usr/local/bin

0 commit comments

Comments
 (0)