Start vscode edit code in docker

If you want to use vscoed to edit the code in docker, start the container first

docker exec -it $(docker container ls -q) /bin/bash

Then start vscode

code --user-data-dir

At this point, vscode is opened in the docker directory, and you can open the file you want to edit in the upper left corner.

Guess you like

Origin blog.csdn.net/wangyifan123456zz/article/details/110196606