From 136d9d1fa9e69bec8c8c3de2720609ad2f704aeb Mon Sep 17 00:00:00 2001 From: Kailash Nadh Date: Mon, 28 Oct 2024 12:56:49 +0530 Subject: [PATCH] Don't fail on chown in Docker entry script. Closes #2104. --- docker-entrypoint.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index a7b61a796..15e0aa61f 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -34,8 +34,10 @@ create_user() { create_group create_user -# Set the ownership of the app directory to the app user -chown -R ${PUID}:${PGID} /listmonk +# Try to set the ownership of the app directory to the app user. +if ! chown -R ${PUID}:${PGID} /listmonk 2>/dev/null; then + echo "Warning: Failed to change ownership of /listmonk. Readonly volume?" +fi echo "Launching listmonk with user=[${USER_NAME}] group=[${GROUP_NAME}] PUID=[${PUID}] PGID=[${PGID}]"