Proxy jump to Docker container on remote cluster

I have a remote machine, with a running Docker container, and I want to set-up Pycharm to use the Python interpreter within the container. So, the situation is something like this:

PyCharm
      ^
local_machine -->  remote_machine
                         |
                         V
                   docker_container                                

On the local machine, I have a ~/.ssh/config file:

Host remote_machine
        HostName remote_machine_ip
        User user_name

Host docker_vie01_00
    HostName docker_container_ip_address
    User root
    ProxyJump remote_machine   

I can ssh to the docker container from my local machine using:

ssh docker_vie01_00

I'm asked for a password (I configured the Docker root password in the Dockerfile that I used to create the container), and I'm in the container.  

EDIT: please see my second post for more precise info about the issue.

0
3 comments
Hi, this sounds more like a bug, so I would suggest to submit a bug report to https://youtrack.jetbrains.com providing the following data:

- logs from **Help | Collect Logs and Diagnostic Data** after reproducing the issue
- The verbose connection output using `ssh -v docker_container_00 date`
0

Ok, a few updates, since I investigated this a little more. It seems I made some progress, but didn't manage to make this work yet.

If I check the SSH Configurations section, everything seems to be working fine:

 

However, using the same SSH configuration for the deployment fails:

 

I tried creating the interpreter using the SSH server:

 

Which seems to be successful, this is the output:

Successfully connected to root@docker_vie01_00:22

> pwd
/root
Command finished with exit code 0

Checking rsync connection...
/usr/bin/rsync -n -e "ssh -p 22 " root@docker_vie01_00:

root@172.17.0.3's password: 

drwx------        4096 2023/05/04 15:12:02 .
-rw-------          15 2023/05/04 15:12:02 .bash_history
-rw-r--r--        3106 2019/12/05 15:39:21 .bashrc
-rw-r--r--         161 2019/12/05 15:39:21 .profile
drwxrwxr-x        4096 2023/04/17 11:26:00 .aws
drwxr-xr-x        4096 2023/04/17 17:00:43 .cache
drwxr-xr-x        4096 2023/04/17 17:00:37 .npm
drwxr-xr-x        4096 2023/05/04 15:10:10 work
Process finished with exit code 0

Starting introspection for Python...
> echo ${SHELL}
/bin/bash
Command finished with exit code 0
> /usr/bin/which python3
/usr/bin/python3
Command finished with exit code 0
> echo ${HOME}
/root
Command finished with exit code 0

Introspection completed

but then, Pycharm can't navigate the container folders to let me find the Python interpreter:

 

I also tried setting the interpreter path manually, but then it seems that nothing is loaded:

If I try to run the code, I get this error window:

Is the suggestion this might be a bug still  valid, or am I doing something wrong?

 

P.S. I didn't figure out how to resize images in the post yet, sorry if they take so much space!

0
Yes, I think this is probably a bug, or some unsupported SSH configuration. We will be able to tell more after seeing logs. I would still recommend to submit an issue to https://youtrack.jetbrains.com with all the information and logs from **Help | Collect Logs and Diagnostic Data** after reproducing the issue.
0

Please sign in to leave a comment.