From 0b2925709c8f0a130f727176fa4241b251129b77 Mon Sep 17 00:00:00 2001 From: Mitchell Allain Date: Sun, 13 Aug 2023 14:36:55 -0500 Subject: [PATCH] Use double quotes in docker entrypoint to prevent word splitting --- docker/docker-entrypoint.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index d45ed3d7ef..6d776feb0e 100755 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -29,8 +29,8 @@ configure() { echo "To reconfigure InvokeAI, delete the above file." echo "======================================================================" else - mkdir -p ${INVOKEAI_ROOT} - chown --recursive ${USER} ${INVOKEAI_ROOT} + mkdir -p "${INVOKEAI_ROOT}" + chown --recursive ${USER} "${INVOKEAI_ROOT}" gosu ${USER} invokeai-configure --yes --default_only fi } @@ -50,16 +50,16 @@ fi if [[ -v "PUBLIC_KEY" ]] && [[ ! -d "${HOME}/.ssh" ]]; then apt-get update apt-get install -y openssh-server - pushd $HOME + pushd "$HOME" mkdir -p .ssh - echo ${PUBLIC_KEY} > .ssh/authorized_keys + echo "${PUBLIC_KEY}" > .ssh/authorized_keys chmod -R 700 .ssh popd service ssh start fi -cd ${INVOKEAI_ROOT} +cd "${INVOKEAI_ROOT}" # Run the CMD as the Container User (not root). exec gosu ${USER} "$@"