Skip to content

Commit cc5e638

Browse files
authored
Merge pull request #430 from infosiftr/fix-sed-conf
Add -type f to not break symlinks
2 parents f614686 + 2c42674 commit cc5e638

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

apache-extras.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ RUN set -eux; \
1515
a2enconf remoteip; \
1616
# https://github.com/docker-library/wordpress/issues/383#issuecomment-507886512
1717
# (replace all instances of "%h" with "%a" in LogFormat)
18-
find /etc/apache2 -name '*.conf' -exec sed -ri 's/([[:space:]]*LogFormat[[:space:]]+"[^"]*)%h([^"]*")/\1%a\2/g' '{}' +
18+
find /etc/apache2 -type f -name '*.conf' -exec sed -ri 's/([[:space:]]*LogFormat[[:space:]]+"[^"]*)%h([^"]*")/\1%a\2/g' '{}' +

php7.1/apache/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ RUN set -eux; \
7979
a2enconf remoteip; \
8080
# https://github.com/docker-library/wordpress/issues/383#issuecomment-507886512
8181
# (replace all instances of "%h" with "%a" in LogFormat)
82-
find /etc/apache2 -name '*.conf' -exec sed -ri 's/([[:space:]]*LogFormat[[:space:]]+"[^"]*)%h([^"]*")/\1%a\2/g' '{}' +
82+
find /etc/apache2 -type f -name '*.conf' -exec sed -ri 's/([[:space:]]*LogFormat[[:space:]]+"[^"]*)%h([^"]*")/\1%a\2/g' '{}' +
8383

8484
VOLUME /var/www/html
8585

php7.2/apache/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ RUN set -eux; \
7979
a2enconf remoteip; \
8080
# https://github.com/docker-library/wordpress/issues/383#issuecomment-507886512
8181
# (replace all instances of "%h" with "%a" in LogFormat)
82-
find /etc/apache2 -name '*.conf' -exec sed -ri 's/([[:space:]]*LogFormat[[:space:]]+"[^"]*)%h([^"]*")/\1%a\2/g' '{}' +
82+
find /etc/apache2 -type f -name '*.conf' -exec sed -ri 's/([[:space:]]*LogFormat[[:space:]]+"[^"]*)%h([^"]*")/\1%a\2/g' '{}' +
8383

8484
VOLUME /var/www/html
8585

php7.3/apache/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ RUN set -eux; \
8080
a2enconf remoteip; \
8181
# https://github.com/docker-library/wordpress/issues/383#issuecomment-507886512
8282
# (replace all instances of "%h" with "%a" in LogFormat)
83-
find /etc/apache2 -name '*.conf' -exec sed -ri 's/([[:space:]]*LogFormat[[:space:]]+"[^"]*)%h([^"]*")/\1%a\2/g' '{}' +
83+
find /etc/apache2 -type f -name '*.conf' -exec sed -ri 's/([[:space:]]*LogFormat[[:space:]]+"[^"]*)%h([^"]*")/\1%a\2/g' '{}' +
8484

8585
VOLUME /var/www/html
8686

0 commit comments

Comments
 (0)