简体   繁体   中英

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM