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.