From 7120ad1486877c1fe6acf3bff9ce2355a662baad Mon Sep 17 00:00:00 2001 From: Kibo Hikari Date: Mon, 13 May 2019 10:31:41 +0000 Subject: [PATCH 1/2] Revert "Remove chmod on project dir" Due to the decision to remove the mode change, this inheriintly reintroduced a bug that prevents the system to write to the bind mmounted folder. the chmod is intended to *fix* it. This reverts commit cdc5b55a9d6e01237709380ed58ce233f9301af9. --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0610301a3fb3..f014b292172e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,12 +39,13 @@ RUN adduser --gecos '' --disabled-password coder && \ USER coder # We create first instead of just using WORKDIR as when WORKDIR creates, the user is root. -RUN mkdir -p /home/coder/project +RUN mkdir -p /home/coder/project && \ + chmod g+rw /home/coder/project; WORKDIR /home/coder/project # This assures we have a volume mounted even if the user forgot to do bind mount. -# So that they do not lose their data if they delete the container. +# XXX: Workaround for GH-459 and for OpenShift compatibility. VOLUME [ "/home/coder/project" ] COPY --from=0 /src/packages/server/cli-linux-x64 /usr/local/bin/code-server From 3c6451eafe65c663aacc82421826ba04ed3261e7 Mon Sep 17 00:00:00 2001 From: Kibo Hikari Date: Mon, 13 May 2019 18:37:55 +0800 Subject: [PATCH 2/2] fix(Dockerfile): re-add original comment --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f014b292172e..873e35b4abed 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,7 +45,7 @@ RUN mkdir -p /home/coder/project && \ WORKDIR /home/coder/project # This assures we have a volume mounted even if the user forgot to do bind mount. -# XXX: Workaround for GH-459 and for OpenShift compatibility. +# So that they do not lose their data if they delete the container. VOLUME [ "/home/coder/project" ] COPY --from=0 /src/packages/server/cli-linux-x64 /usr/local/bin/code-server