Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS Code Remote Development using a docker container hosted in the cloud

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.

UPDATE 2021-12-04:

I solved the issue by using GitHub Codespaces

like image 648
Martin Carlsson Avatar asked Nov 22 '25 20:11

Martin Carlsson


1 Answers

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.

like image 81
Aviv Lo Avatar answered Nov 25 '25 10:11

Aviv Lo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!