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} "$@"