Skip to content

Commit

Permalink
Merge pull request #819 from jordanpwalsh/docker-workdir-support
Browse files Browse the repository at this point in the history
Docker workdir support
  • Loading branch information
mergify[bot] authored Aug 17, 2024
2 parents 0b04cd0 + 3c89346 commit af13695
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/schema/vimspector.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@
"type": "string",
"description": "Name or container id of the docker run container to connect to (via docker exec). Note the container must already be running (Vimspector will not start it) and it must have the port forwarded to the host if subsequently connecting via a port (for example <tt>docker run -p 8765:8765 -it simple_python</tt>)."
},
"docker_args": {
"type": "array",
"items": {"type": "string"},
"description": "Extra command line args to pass to docker exec."
},
"ssh": {
"type": "object",
"description": "Optional to customize the ssh client and its arguments to execute for remote-launch or remote-attach.",
Expand Down
2 changes: 2 additions & 0 deletions python3/vimspector/debug_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -1683,6 +1683,8 @@ def _GetShellCommand( self ):

def _GetDockerCommand( self, remote ):
docker = [ 'docker', 'exec', '-t' ]
if 'docker_args' in remote:
docker += remote[ 'docker_args' ]
docker.append( remote[ 'container' ] )
return docker

Expand Down

0 comments on commit af13695

Please sign in to comment.