Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
feat: user-mode docker #192
Describe in detail the problem you had and how this PR fixes it
Prior to discussion to #65, this runs all file operations in the user
Is there an open issue you can link to?
This resolves #65. This will be blocked until general consensus that this merit as a merge.
coadler left a comment
I think this is a good change and should debate the semantics on an issue later. This seems to be the last step for
I feel like this is worth mentioning, but I made my own changes to shift over to a non-root user that mimic the changes in this PR. The Dockerfile in question is here: https://gist.github.com/davefinster/39825c0fa7cf168b8114d24bd3b3df53
When I first deployed the container and everything worked except Workspace creation. The container was setup via Kube using these params:
command: ["code-server"] args: - --allow-http - --no-auth - --port=8440 - --data-dir=/home/coder/.code-server - /home/coder workingDir: /home/coder
Despite that, I was getting file write errors (due to permissions - non-root user writing into /root so not surprising) whenever VS Code tried to anything Workspace related since it was always attempting to write into /root/.code-server/Workspaces/number/workspace.json regardless of what I did. I ended up having to add these lines to get it to work:
mkdir -p /root/.code-server/Workspaces && \ chown -R 3000 /root/.code-server && \ chmod -R 777 /root/.code-server && \ chmod 755 /root