microsoft / vscode-dev-containers

NOTE: Most of the contents of this repository have been migrated to the new devcontainers GitHub org (https://github.com/devcontainers). See https://github.com/devcontainers/template-starter and https://github.com/devcontainers/feature-starter for information on creating your own!
https://aka.ms/vscode-remote
MIT License
4.7k stars 1.41k forks source link

The property DOCKER_HOST in docker.environment does not work. #1753

Open LI-GUOJIE opened 1 year ago

LI-GUOJIE commented 1 year ago

Develop on a remote Docker host (the official tutorial link)

However, there is a serious problem in the tutorial, the property "DOCKER_HOST" does not exist:

"docker.environment": {
    "DOCKER_HOST": "ssh://your-remote-user@your-remote-machine-fqdn-or-ip-here"
}

I add a line into my settings.json, and it works!

{
    // It's better to add this line into User's settings.json.
    // How to set an alias name to login SSH server, https://ostechnix.com/how-to-create-ssh-alias-in-linux/
    "docker.host":"ssh://tc"
}

I love this project (It looks like github codespaces), so I create an easier tutorial for myself.