oak
oak

Reputation: 3028

How to setup a secure connection on remote docker on remote server with pycharm

Pycharm

SSH->Remote docker

We are using a remote interpreter for python on Pycharm which works great on an SSH connection. We are in a phase to convert our main work on docker container. It is important for us to keep to the development process on the remote servers and not on the local computer. But it is also important to be able to do it over docker container, and not just ssh as this saves a lot of time and effort when starting a new development server.

Remote docker -> Securely remote docker

What we are seeking is a way to be able to make a remote docker connection within Pycharm securely. It seems that when generating the Tls certificate, we need to bind it to the host IP's. This IP/host bounding prevents us to quickly start new servers for development as this force to generate a certificate per IP.

My question, is it possible to make a secure connection for docker engine from Pycharm without bound the remote docker to its host IP?

Edit:

Possible option so far

Wild card certificate:

As Jan Garaj suggestions, use a wild card certificate. Then connect each new server to a new subdomain. The wild card will be the same for each of them.

Pros: This suppose to do the trick Cons: It requires to set up a new subdomain for each server

SSH tunnle

Set the docker socket to allow connection from localhost. Then each developer can set up an ssh tunnel from his computer to the remote machine. In Pycharm setup python interpeter to docker socket via localhost with the same port as the tunnel.

Upvotes: 3

Views: 524

Answers (1)

Jan Garaj
Jan Garaj

Reputation: 28686

Use (= buy or create/install/use own CA + generate) wildchar TLS certificate, which will cover all current servers and also any new servers.

Upvotes: 1

Related Questions