Skip to content

Commit 4313578

Browse files
committed
fix(docker): ensure 'chown' does not break on read-only fs; fixes #6264
1 parent 42c2dea commit 4313578

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

docker/docker-entrypoint.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@ usermod -u ${USER_ID} ${USER} 1>/dev/null
2323
# but it is useful to have the full SSH server e.g. on Runpod.
2424
# (use SCP to copy files to/from the image, etc)
2525
if [[ -v "PUBLIC_KEY" ]] && [[ ! -d "${HOME}/.ssh" ]]; then
26-
apt-get update
27-
apt-get install -y openssh-server
28-
pushd "$HOME"
29-
mkdir -p .ssh
30-
echo "${PUBLIC_KEY}" > .ssh/authorized_keys
31-
chmod -R 700 .ssh
32-
popd
33-
service ssh start
26+
apt-get update
27+
apt-get install -y openssh-server
28+
pushd "$HOME"
29+
mkdir -p .ssh
30+
echo "${PUBLIC_KEY}" >.ssh/authorized_keys
31+
chmod -R 700 .ssh
32+
popd
33+
service ssh start
3434
fi
3535

3636
mkdir -p "${INVOKEAI_ROOT}"
37-
chown --recursive ${USER} "${INVOKEAI_ROOT}"
37+
chown --recursive ${USER} "${INVOKEAI_ROOT}" || true
3838
cd "${INVOKEAI_ROOT}"
3939

4040
# Run the CMD as the Container User (not root).

0 commit comments

Comments
 (0)