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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exec in container with custom user #7311

Merged
merged 4 commits into from Aug 15, 2023

Conversation

megglos
Copy link
Contributor

@megglos megglos commented Jul 17, 2023

Hey folks,
first of all many thanks for this great library!

We are about the change the default user used in our docker image on https://github.com/camunda/zeebe from root to a less privileged user to better comply with docker security best practices.

Unfortunately we have some test setup code where we'd like to make use of root privileges still though 馃檭 . We thus made use of the docker-java-api directly bypassing the ContainerState.execInContainer API offered by you to run commands, which we used previously.

Thus we figured it would be nice to expose the ExecCreateCmd.withUser API provided by the docker-java-api on testcontainer's ContainerState.

Curious on your feedback on this proposed change!

* allows to run commands with a custom user
@eddumelendez eddumelendez added this to the next milestone Aug 15, 2023
@eddumelendez eddumelendez merged commit ea0b163 into testcontainers:main Aug 15, 2023
86 checks passed
@eddumelendez
Copy link
Member

Thanks for your contribution, @megglos ! This will be part of the next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants