Open VScode from terminal in php container

In my ZSH terminal on WSL if I am not inside of php container, I can open the VSCode in any folder with the command:

code .

If I enter the container with ./shell.sh I can’t open VScode in this way any more:

bash: code: command not found

Is it possible to make it work in the container as well?

This seems rather impossible. Could you please explain what the benefit is of doing this?

My question was “Is it possible…” meaning that may be it works if I do some settings or install something…
It is not only about opening the vccode from terminal but in general, working inside of container remotely and keeping the same vscode functions as working with projects opening them in windows.
If I open a project in vscode with remote WSL plugin, many functions of the editor are not available any more. The Prettier doesn’t work. If I hover over a function or object, it doesn’t show where it was declared etc. So, inside of container many vscode functions are not available.
What is the benefit to work using Remote WSL if I loose many other benefits which I have, when I open the WSL project from windows file explorer?

I found the solution to this issue in WSL :slight_smile: In VSCode I have the extensions installed locally. In order to work in WSL, is necessary to install them in WSL as well. When opening a WSL Remote connection and click on extensions, vscode shows Local - Installed and WSL: UBUNTU - Installed. The Local Installed extensions which are not available in WSL are dimmed and have a green button “Install in WSL: …”
For docker container it still is an issue, but now so significant.