From e52682686a6ad7202e432ed143d396ca8635e355 Mon Sep 17 00:00:00 2001 From: "Lin, Hung-Shin" Date: Wed, 25 Oct 2023 12:20:00 +0800 Subject: [PATCH] fix: load .zshrc in system dir --- quests/helloworld/home/forgotten_scroll.txt | 3 ++- server/src/containers/docker.js | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/quests/helloworld/home/forgotten_scroll.txt b/quests/helloworld/home/forgotten_scroll.txt index f4982cf..9c7569d 100644 --- a/quests/helloworld/home/forgotten_scroll.txt +++ b/quests/helloworld/home/forgotten_scroll.txt @@ -6,4 +6,5 @@ Speak the words of pow er and awaken the might of Unix: ~~~~~~~~~~~~~~~~~~~~~~~~~~ Unix, rise and guide me! - ~~~~~~~~~~~~~~~~~~~~~~~~~~ \ No newline at end of file + ~~~~~~~~~~~~~~~~~~~~~~~~~~ + \ No newline at end of file diff --git a/server/src/containers/docker.js b/server/src/containers/docker.js index bc3a39a..be652f5 100644 --- a/server/src/containers/docker.js +++ b/server/src/containers/docker.js @@ -50,7 +50,11 @@ export async function attachContainer(container, { token }) { AttachStderr: true, Cmd: ['/bin/zsh'], Tty: true, - Env: [`TOKEN=${token}`, `API_ENDPOINT=http://backend:3000`], + Env: [ + `TOKEN=${token}`, + `API_ENDPOINT=http://backend:3000`, + 'ZDOTDIR=/etc/zsh', + ], }) const execOutput = await exec.start({