From dcf72d046c5a20ddce6f10addf084415bbc3d6a2 Mon Sep 17 00:00:00 2001 From: "Chen, Tai-Lin" Date: Fri, 2 Aug 2024 11:12:30 +0800 Subject: [PATCH] quest: fix checkpoint-03 --- quests/checkpoint-03/Dockerfile | 7 +++++-- quests/checkpoint-03/game.yml | 6 +++--- quests/checkpoint-03/home/folder/hello.txt | 2 +- quests/checkpoint-03/home/trash_can/secret/letter.txt | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/quests/checkpoint-03/Dockerfile b/quests/checkpoint-03/Dockerfile index d8b55a3..377fb37 100644 --- a/quests/checkpoint-03/Dockerfile +++ b/quests/checkpoint-03/Dockerfile @@ -1,4 +1,7 @@ FROM linuxodyssey/quest-base -COPY home ${HOME} -RUN chmod +W /folder \ No newline at end of file +USER root +COPY home . +RUN chown -R ${USERNAME}:${USERNAME} . + +USER ${USERNAME} \ No newline at end of file diff --git a/quests/checkpoint-03/game.yml b/quests/checkpoint-03/game.yml index 46410a5..1f1c858 100644 --- a/quests/checkpoint-03/game.yml +++ b/quests/checkpoint-03/game.yml @@ -50,7 +50,7 @@ stages: responses: - type: narrative content: | - 請複製 `folder` 資料夾中的檔案,並命名為 `world.txt`。 + 請複製 `folder` 資料夾中的檔案到 `folder` 中,並命名為 `world.txt` 。 - id: cp-hello-world task: 複製 `folder` 中的檔案並命名為 `world.txt` @@ -58,7 +58,7 @@ stages: - ls-~ condition: command: - - ^cp \Shello.txt \Sworld.txt$ + - ^cp .*hello.txt .*world.txt$ files: - path: /home/commander/folder/hello.txt type: file @@ -75,7 +75,7 @@ stages: - cp-hello-world condition: command: - - ^rm \Shello.txt$ + - ^rm .*hello.txt$ files: - path: /home/commander/folder/hello.txt type: file diff --git a/quests/checkpoint-03/home/folder/hello.txt b/quests/checkpoint-03/home/folder/hello.txt index 2c20110..3bd5213 100644 --- a/quests/checkpoint-03/home/folder/hello.txt +++ b/quests/checkpoint-03/home/folder/hello.txt @@ -1 +1 @@ -This is `hello.txt`. \ No newline at end of file +This is `hello.txt`. diff --git a/quests/checkpoint-03/home/trash_can/secret/letter.txt b/quests/checkpoint-03/home/trash_can/secret/letter.txt index 03ddc28..b95980b 100644 --- a/quests/checkpoint-03/home/trash_can/secret/letter.txt +++ b/quests/checkpoint-03/home/trash_can/secret/letter.txt @@ -1 +1 @@ -aHR0cHM6Ly9yZXVybC5jYy9YUjZZMDA= \ No newline at end of file +aHR0cHM6Ly9yZXVybC5jYy9YUjZZMDA=