linuxserver / docker-code-server

GNU General Public License v3.0
1.63k stars 327 forks source link

[BUG] --install-extension not work #140

Closed huang12zheng closed 1 year ago

huang12zheng commented 1 year ago

Is there an existing issue for this?

Current Behavior

/app/code-server/bin/code-server "--extensions-dir" "/tmp/extensions" "--install-extension" Dart-Code.flutter-3.44.0.vsix

Uploading 2023-01-10 17-36-36.mp4…

https://user-images.githubusercontent.com/28038074/211522454-20daa084-6586-480e-819d-32b3f040903b.mp4

https://user-images.githubusercontent.com/28038074/211521 vsix.zip

https://user-images.githubusercontent.com/28038074/211523150-bbb5e712-a54b-4d4f-bbc8-c52c742c6b39.mp4

Expected Behavior

install success or how to install it

Steps To Reproduce

run docker container and find vsix not install

Environment

- OS: macos
- How docker service was installed:

CPU architecture

x86-64

Docker creation

port=37$(($RANDOM%100+100))
echo "port is: $port"
docker run -d \
  --name=code-server$port \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Asia/Shanghai \
  -e PASSWORD=password \
  -e SUDO_PASSWORD=password \
  -e DEFAULT_WORKSPACE=/config/workspace \
  -p $port:8443 \
  --restart unless-stopped \
  -v /Users/huangzheng/Container/vscode-server/vsix:/vsix/ \
  hzgood/my-coder
docker run -p 8443:8443 -d -v /Users/huangzheng/Container/vscode-server/vsix:/vsix/ linuxserver/code-server

Container logs

2023-01-10 17:57:04 [migrations] started
2023-01-10 17:57:04 [migrations] no migrations found
2023-01-10 17:57:04 usermod: no changes
2023-01-10 17:57:04 
2023-01-10 17:57:04 -------------------------------------
2023-01-10 17:57:04           _         ()
2023-01-10 17:57:04          | |  ___   _    __
2023-01-10 17:57:04          | | / __| | |  /  \
2023-01-10 17:57:04          | | \__ \ | | | () |
2023-01-10 17:57:04          |_| |___/ |_|  \__/
2023-01-10 17:57:04 
2023-01-10 17:57:04 
2023-01-10 17:57:04 Brought to you by linuxserver.io
2023-01-10 17:57:04 -------------------------------------
2023-01-10 17:57:04 
2023-01-10 17:57:04 To support LSIO projects visit:
2023-01-10 17:57:04 https://www.linuxserver.io/donate/
2023-01-10 17:57:04 -------------------------------------
2023-01-10 17:57:04 GID/UID
2023-01-10 17:57:04 -------------------------------------
2023-01-10 17:57:04 
2023-01-10 17:57:04 User uid:    911
2023-01-10 17:57:04 User gid:    911
2023-01-10 17:57:04 -------------------------------------
2023-01-10 17:57:04 
2023-01-10 17:57:04 [custom-init] No custom files found, skipping...
2023-01-10 17:57:04 starting with no password
2023-01-10 17:57:04 [2023-01-10T09:57:04.872Z] info  Wrote default config file to ~/.config/code-server/config.yaml
2023-01-10 17:57:05 [2023-01-10T09:57:05.298Z] info  code-server 4.9.1 f7989a4dfcf21085e52157a01924d79d708bcc05
2023-01-10 17:57:05 [2023-01-10T09:57:05.305Z] info  Using user-data-dir ~/data
2023-01-10 17:57:05 [2023-01-10T09:57:05.347Z] info  Using config file ~/.config/code-server/config.yaml
2023-01-10 17:57:05 [2023-01-10T09:57:05.347Z] info  HTTP server listening on http://0.0.0.0:8443/ 
2023-01-10 17:57:05 [2023-01-10T09:57:05.347Z] info    - Authentication is disabled 
2023-01-10 17:57:05 [2023-01-10T09:57:05.347Z] info    - Not serving HTTPS 
2023-01-10 17:57:05 [ls.io-init] done.
2023-01-10 17:57:40 [09:57:40] 
2023-01-10 17:57:40 
2023-01-10 17:57:40 
2023-01-10 17:57:40 
2023-01-10 17:57:40 
2023-01-10 17:57:40 [09:57:40] Extension host agent started.
2023-01-10 17:57:42 [09:57:42] [172.17.0.1][12240f64][ManagementConnection] New connection established.
2023-01-10 17:57:43 [09:57:43] [172.17.0.1][a9fea1be][ExtensionHostConnection] New connection established.
2023-01-10 17:57:43 [09:57:43] [172.17.0.1][a9fea1be][ExtensionHostConnection] <219> Launched Extension Host Process.
2023-01-10 18:00:43 [10:00:43] Installing extension: matklad.rust-analyzer
2023-01-10 18:00:46 [10:00:46] Extracted extension to /config/extensions/.9466635d-a799-4582-b748-0702d39bce71: matklad.rust-analyzer
2023-01-10 18:00:46 [10:00:46] Renamed to /config/extensions/matklad.rust-analyzer-0.2.853
2023-01-10 18:00:46 [10:00:46] Extracting completed. matklad.rust-analyzer
2023-01-10 18:00:46 [10:00:46] Extension installed successfully: matklad.rust-analyzer
2023-01-10 17:57:42 [09:57:42] Using the in-memory credential store as the operating system's credential store could not be accessed. Please see https://aka.ms/vscode-server-keyring on how to set this up. Details: libsecret-1.so.0: cannot open shared object file: No such file or directory
2023-01-10 17:57:43 [2023-01-10T09:57:43.664Z] error Failed to get latest version {"error":"https://api.github.com/repos/coder/code-server/releases/latest: 403"}
github-actions[bot] commented 1 year ago

Thanks for opening your first issue here! Be sure to follow the bug or feature issue templates!

huang12zheng commented 1 year ago

must add arg "--extensions-dir" "/config/extensions" I don't think it was needed before.

or, How to set this arg '--extensions-dir' like /tmp/extension to vscode

Roxedus commented 1 year ago

This is not a bug, it has always been needed. We provide the install-extension helper command for this purpose.