profile
viewpoint

Ask questionsUnable to save extensions and other config on local host system

<!-- Please search existing issues to avoid creating duplicates. -->

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

https://github.com/cdr/code-server/issues/703

cdr/code-server

Answer questions kr1sp1n

I could fix this by just mounting the data-dir instead of the extensions dir: docker run -it -p 127.0.0.1:8443:8443 -v "${PWD}:/home/coder/project" -v "${HOME}/.vscode:/home/coder/.local/share/code-server" codercom/code-server --allow-http --no-auth. Now it works as expected and the extensions are saved on the docker host as well.

useful!
source:https://uonfu.com/
answerer
Krispin Schulz kr1sp1n @avenga Berlin, Germany Life loving, bass playing, bit shifting monkeee. SSB: @CdbxtxeHwET1HRU5naALgGaX5Q7BdzpyTCf78ZgIaEM=.ed25519
Github User Rank List