Reputation: 471
With the VS Code extension Visual Studio Code Remote - Containers I can develop inside a container that is spun up on my local computer via Docker Desktop.
Is there any way to develop inside a container hosted on Azure, AWS, Google Cloud, or any other cloud system instead?
I can't use Docker Desktop locally because I'm on a Macbook Pro with Apple Silicon, meaning that Docker does not work the same way as it would on an Intel chip.
I solved the issue by using GitHub Codespaces
Upvotes: 3
Views: 1498
Reputation: 2166
You can use docker context
It forwards the remote docker socket via ssh to your local machine
docker context create NAME_OF_THE_CONTEXT --docker "host=ssh://$SERVER_USER_NAME@$SERVER_IP"
Use the context
docker context use NAME_OF_THE_CONTEXT
Now you can run docker commands in your local terminal that will be executed on the remote host.
So now you can connect to remote containers via VSCode as if the containers are running remotely.
Upvotes: 1