question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using Docker backend on a remote Docker host/container

See original GitHub issue

I’d like to be able to use the testinfra convenience methods provided by the Docker backend on a REMOTE Docker container.

Is this possible?

I know that I could use ssh or paramiko connection to connect to the remote Docker host but I would have to “manually” docker exec into my container. I would not be able to use the testinfra convenience methods (.file, .package etc.) on the container itself.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:1
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
philpepcommented, Mar 16, 2019

Hi @ecks , I’ll be happy to review a PR from you, thanks!

I think the + character can be used but I’d rather use it to separate the “whole” connection string, like:

ssh://user@host_2+docker://user@docker_id

Then we can just split on + and parse both connection strings. Then write some funny code to handle the “backend” chaining 😃

1reaction
eckscommented, Feb 26, 2019

hmm yeah that sounds like it would be pretty useful. I could potentially work on a PR for that. I took a look at the source and looks like urlparse is used to parse the URI. So I don’t think the symbol ‘+’ is parsed, and if you do something like

urlparse("ssh+docker://user@host_2+user@docker_id")

in netloc the value would be user2@host1+user1@host2, which we can split on. What are your thoughts, does that URI look pretty readable?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Docker backend on a remote Docker host/container #408
I'd like to be able to use the testinfra convenience methods provided by the Docker backend on a REMOTE Docker container. Is this...
Read more >
Docker Compose with two containers - Flask REST API ...
Using Compose is basically a three-step process: Define app's environment with a Dockerfile so it can be reproduced anywhere. Define the services that...
Read more >
Runtime options with Memory, CPUs, and GPUs
Docker provides ways to control how much memory, or CPU a container can use, setting runtime configuration flags of the docker run command....
Read more >
How I Started Using Docker and Why You Should Too
In this piece, I outline the journey through which I found Docker and I aim to convince just one person reading this, that...
Read more >
Profile an Application on Two Docker* Containers - Intel
For a host container with Intel VTune Profiler installed, use the following command: docker ... vtune-backend --allow-remote-ui --enable-server-profiling.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found