linuxserver / docker-openvscode-server

GNU General Public License v3.0
110 stars 16 forks source link

Symlink to "code" executable #20

Closed fabricionaweb closed 2 years ago

fabricionaweb commented 2 years ago

linuxserver.io


Desired Behavior

I'd like to have the binary code pointing right. Something like

ln -s /app/openvscode-server/openvscode-server /usr/local/bin/code

I think code is the default executable in VSCode in all platforms, and should have it.

I suggest the same for linuxserver/docker-code-server image.

And update the docker-mods code-server-extension-arguments to call code instead, then will be compatible.

Current Behavior

There is only openvscode-server binary and the docker-mods code-server-extension-arguments does not work for openvscode-server

Alternatives Considered

cp instad of symlink? The gitpod repo does it

github-actions[bot] commented 2 years ago

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

aptalca commented 2 years ago

I'd like to have the binary code pointing right

Why? It's already running when you're in the terminal.

With regards to that mod, it's only for code-server and I personally don't see the point of it. Installing extensions is a one time thing and they remain persistent already. No reason to want to install them on every start.

fabricionaweb commented 2 years ago

I thought code-server and openvscode-server has the same cli but I saw already its different stuffs. So forget about code-server and the mod, I dont know much about it anyway so I cant suggest...

Talking about openvscode-server Im pretty sure the binary has the same propose as code cli.

They are doing it in gitpod's image

Running code --help inside VSCode Desktop returns the same stuff as running openvscode-server --help

abc@b30829584150:~$ openvscode-server --help
openvscode-server 1.67.1

Usage: openvscode-server [options][paths...]

To read from stdin, append '-' (e.g. 'ps aux | grep code | openvscode-server -')

Options
  -d --diff <file> <file>           Compare two files with each other.
  -a --add <folder>                 Add folder(s) to the last active window.
  -g --goto <file:line[:character]> Open a file at the path on the specified line and character position.
  -n --new-window                   Force to open a new window.
  -r --reuse-window                 Force to open a file or folder in an already opened window.
  -w --wait                         Wait for the files to be closed before returning.
  -h --help                         Print usage.

Extensions Management
  --list-extensions                   List the installed extensions.
  --show-versions                     Show versions of installed extensions, when using --list-extensions.
  --category <category>               Filters installed extensions by provided category, when using --list-extensions.
  --install-extension <ext-id | path> Installs or updates an extension. The argument is either an extension id or a path to a VSIX. The identifier of an extension is
                                      '${publisher}.${name}'. Use '--force' argument to update to latest version. To install a specific version provide '@${version}'. For example:
                                      'vscode.csharp@1.2.3'.
  --uninstall-extension <ext-id>      Uninstalls an extension.

Troubleshooting
  -v --version Print version.
  --verbose    Print verbose output (implies --wait).
  -s --status  Print process usage and diagnostics information.
➜ code --help
code 1.67.2

Usage: code [options][paths...]

To read from stdin, append '-' (e.g. 'ps aux | grep code | code -')

Options
  -d --diff <file> <file>           Compare two files with each other.
  -a --add <folder>                 Add folder(s) to the last active
                                    window.
  -g --goto <file:line[:character]> Open a file at the path on the specified
                                    line and character position.
  -n --new-window                   Force to open a new window.
  -r --reuse-window                 Force to open a file or folder in an
                                    already opened window.
  -w --wait                         Wait for the files to be closed before
                                    returning.
  -h --help                         Print usage.

Extensions Management
  --list-extensions                   List the installed extensions.
  --show-versions                     Show versions of installed extensions,
                                      when using --list-extensions.
  --category <category>               Filters installed extensions by
                                      provided category, when using
                                      --list-extensions.
  --install-extension <ext-id | path> Installs or updates an extension. The
                                      argument is either an extension id or
                                      a path to a VSIX. The identifier of
                                      an extension is
                                      '${publisher}.${name}'. Use '--force'
                                      argument to update to latest version.
                                      To install a specific version provide
                                      '@${version}'. For example:
                                      'vscode.csharp@1.2.3'.
  --uninstall-extension <ext-id>      Uninstalls an extension.

Troubleshooting
  -v --version Print version.
  --verbose    Print verbose output (implies --wait).
  -s --status  Print process usage and diagnostics information.

The code cli is useful, I also use it to work with git interactive, to edit anything that belongs to the system, to open workspace, files, etc...

Even if you are already inside Code OSS it handle and just open a new tab with your files/worskace...

aptalca commented 2 years ago

you can easily create a bash alias

fabricionaweb commented 2 years ago

Yes, sure. I just thought will be consistent to have it at image level.