Skip to content

Commit 17d3c4b

Browse files
author
lillian
committed
last fixes for unit on read-only root
1 parent 11d29f0 commit 17d3c4b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

wordpress/Dockerfile

+4-3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ RUN wget https://raw.githubusercontent.com/nginx/unit/d48180190752201865f41b2cf1
1111
RUN sed -i 's/docker-entrypoint\.d/app\/config/g' docker-entrypoint.sh
1212
RUN chmod +x docker-entrypoint.sh
1313

14+
# fix for `unlink("/run/unit.pid") failed (2: No such file or directory)`, should ask upstream about this at some point
15+
RUN sed -i 's#set -e#touch /run/unit.pid\n&#' docker-entrypoint.sh
16+
1417
RUN wget -O - https://wordpress.org/wordpress-6.4.2.tar.gz | tar xz
1518

1619
# akismet is preinstalled, although maybe we will want to download a specific version of it at some point
@@ -29,6 +32,4 @@ COPY config.json .
2932
# mount /app/wordpress/wp-config.php:ro
3033
# mount /app/wordpress/wp-content/uploads/:rw
3134

32-
RUN apk add strace
33-
34-
CMD [ "/app/docker-entrypoint.sh", "unitd", "--log", "stdout", "--no-daemon", "--user", "nobody", "--group", "nobody" ]
35+
CMD [ "/app/docker-entrypoint.sh", "unitd", "--log", "/dev/stdout", "--no-daemon", "--user", "nobody", "--group", "nobody" ]

0 commit comments

Comments
 (0)