Pre-requisites
Prepare the container image
In order to allow Remote Development, the container image must have a few packages installed, such as glibc
and libstdc++
for VS Code server to run.
Please refer to the Visual Studio Code Remote SSH documentation for an in-depth explanation on how things work and the system requirements.
In this example, we provide a sample on needed packages to be added for an alpine
-based container image:
RUN apk add musl libgcc libstdc++ git curl wget bash ca-certificates gcompat openssh-client
Please note git
was also included, and although not a strict requirement of the setup, there would be no end to this purpose if the code changes weren't saved.
Language-dependent tools
Please also note that other packages / tools may be necessary for other languages / frameworks, such as xdebug
for PHP, for example. Specific configurations might also need to be defined, such as disabling the opcode cache and setting the needed debugger config values (xdebug.mode=debug
, xdebug.request_start=yes
and xdebug.client_host=127.0.0.1
) for PHP.
Prepare VS Code Extensions
Make sure your VS Code has the right Extension installed for the programming language or framework you use.
Node
For this case, for node we installed the VS Code Extension Remote - SSH extension.
PHP
For PHP, you could use PHP Debug.
Updated about 1 year ago