-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Unable to save extensions and other config on local host system #754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm hitting the same problem. My docker-compose has -
And I am getting the error - [message]: Which puzzles me as I was only mounting the extensions folder not the whole code-server folder. |
I just updated the Docker image since we hadn't done that in a while, but I haven't been able to replicate this yet on any of the old images so I can't say whether the new version will fix this. |
I could fix this by just mounting the |
It's not fixed in the latest version, I have the same problem. @kr1sp1n's fix didn't work for me :/ I am trying to mount the volumes like this:
And I am also getting the error
|
I've been using this. While it works, survives new containers, and is shared across multiple containers. I did some fighting with the Dockerfile some time back, trying to find the right timing to lay down or overwrite the ~coder directory, and finally gave up. I may be playing with fire using the /tmp folder, but I recall having permissions problems trying to use any other location; granted, I didn't fight very long. I'm using a docker volume, not a named host folder. And the related part is the
|
I found that there was an issue in the way that I created the container that was causing my error.
One thing to keep in mind is that you need to make sure that the folders you are trying to mount exist on the host system with the uid 1000, if its not the case, docker creates folders with uid 0(which means owned by root) ; for e.g. say the folder ~/vscode_cloud_ide has the uid 1000 on the host system, and you run the command
You have to make sure the folders local, projects and cache exist on the host system. Otherwise, docker will create them for you with uid 0, even though the parent folder is owned by 1000. This was the issue that I had, now that it is resolved, I am closing this question. |
It seems that the container tries to create a mounting point on a host system with uid 0 (root) when such a directory not exist and causing the permission error on writing after the creation. My suggestion as a workaround is, changing owner of the problematical directory after failing to run the container, than try to run the container again.
I think it is repetitive issue ( #403 ) |
Description
I am trying to run the code-server docker container. I want to be able to persist my extensions and other configuration beyond the life of the container, so i mount the code-server directory as a volume like below --
docker run -it -p 127.0.0.1:8443:8443 -v "/home/vscode_cloud_ide/.local/share/code-server:/home/coder/.local/share/code-server" -v "/home/vscode_cloud_ide/projects:/home/coder/project" codercom/code-server --allow-http --no-auth
This gives me the error below ---
(node:6) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
ERROR { [Error: EACCES: permission denied, mkdir '/home/coder/.local/share/code-server/extensions']
[stack]:
'Error: EACCES: permission denied, mkdir '/home/coder/.local/share/code-server/extensions'',
[message]:
'EACCES: permission denied, mkdir '/home/coder/.local/share/code-server/extensions'',
errno: -13,
code: 'EACCES',
syscall: 'mkdir',
path: '/home/coder/.local/share/code-server/extensions' }
I've looked at past issues, some seem to suggest that the user running the container must have the uid 1000, I checked for this and confirmed it to be so.
Can anybody tell me how to mount all the ide's config as volumes from the host system?
Related Issues
#703
The text was updated successfully, but these errors were encountered: