Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to execute command in running container #163

Closed
oorobets opened this issue Nov 14, 2019 · 3 comments
Closed

Ability to execute command in running container #163

oorobets opened this issue Nov 14, 2019 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@oorobets
Copy link

Is your feature request related to a problem? Please describe.
Ability to execute command in running container

Describe the solution you'd like
container.execInContainer(params string[]);

Describe alternatives you've considered
None

Additional context
For example. I need to run my tests against Solr. Setting it up requires multiple http calls etc.

@HofmeisterAn HofmeisterAn added the enhancement New feature or request label Nov 14, 2019
@HofmeisterAn
Copy link
Collaborator

I would like to make sure I understand you correctly. You want to execute code after a container has been started (besides WithCommand)? This should be very simple. We just need to provide a public method in IDockerContainer and delegate the command straight to TestcontainersClient.ExecAsync.

If you like to contribute, I'd be very happy. Otherwise, I can have a look at it within the next days.

@oorobets
Copy link
Author

oorobets commented Nov 14, 2019

You want to execute code after a container has been started (besides WithCommand)?

That is correct.

If you like to contribute, I'd be very happy

Yes, I can look into this!

HofmeisterAn added a commit that referenced this issue Nov 14, 2019
…rContainer'

{Add ExecAsync to execute shell commands in running containers.}
@HofmeisterAn
Copy link
Collaborator

HofmeisterAn commented Nov 14, 2019

@oorobets I had a few minutes left on my way home. What do you think about: feature/exec-command-in-running-container - sorry did not see your comment.

HofmeisterAn added a commit that referenced this issue Nov 15, 2019
…rContainer'

{Add ExecAsync to execute shell commands in running containers.}
HofmeisterAn added a commit that referenced this issue Nov 15, 2019
…rContainer'

{Add ExecAsync to execute shell commands in running containers.}
@HofmeisterAn HofmeisterAn added this to the 1.0.0 milestone Nov 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants