Skip to content

Commit dfabc07

Browse files
Kibo Hikarikylecarbs
Kibo Hikari
authored andcommitted
fix(dockerfile): explicitly create a volume and set permission for project dir (#471)
Signed-off-by: Kibo Hikari <[email protected]>
1 parent da420cd commit dfabc07

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Dockerfile

+7-1
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,15 @@ RUN adduser --gecos '' --disabled-password coder && \
3939

4040
USER coder
4141
# We create first instead of just using WORKDIR as when WORKDIR creates, the user is root.
42-
RUN mkdir -p /home/coder/project
42+
RUN mkdir -p /home/coder/project && \
43+
chmod g+rw /home/coder/project;
44+
4345
WORKDIR /home/coder/project
4446

47+
# This assures we have a volume mounted even if the user forgot to do bind mount.
48+
# XXX: Workaround for GH-459 and for OpenShift compatibility.
49+
VOLUME [ "/home/coder/project" ]
50+
4551
COPY --from=0 /src/packages/server/cli-linux-x64 /usr/local/bin/code-server
4652
EXPOSE 8443
4753

0 commit comments

Comments
 (0)