-
-
Notifications
You must be signed in to change notification settings - Fork 511
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
redpanda: set entrypoint to the custom entrypoint file #2347
Conversation
✅ Deploy Preview for testcontainers-go ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Hi @bojand, thanks for the PR. However, it is strange to me, that Podman and Docker behave different in this specific instance. So there are cases, where a |
I checked that we have the same situation in tc-java. For me it looks, like Podman does not handle setting an empty Entrypoint correctly (i.e. in the same way as Docker): If the Entrypoint is empty, the Cmd is supposed to become the Entrypoint (see Docker docs). While this PR would fix the issue for Podman users, we generally try to not perform Podman-specific changes, and rather prefer raising this as an issue with Podman (which is generally appreciated in bringing parity to Docker behavior). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @kiview for your review and coming with your insights.
LGTM
* main: feat: support for waiting for response headers (testcontainers#2349) chore(deps): bump google.golang.org/protobuf from 1.32.0 to 1.33.0 (testcontainers#2392) redpanda: set entrypoint to the custom entrypoint file (testcontainers#2347)
What does this PR do?
Redpanda module has a custom entrypoint file
/entrypoint-tc.sh
that waits until the actual Redpanda broker node config file is mounted.Then proceeds to call the normal Redpanda entryfile
/entrypoint.sh
.The current implementation of the module sets the entrypoint file into the
Cmd
of theContainerRequest
.This seems to work with
Docker
, but does not work withPodman
.This results in an error when starting the container:
Since the intent is to override the entrypoint, we should be setting
Entrypoint
property as this is more appropriate.In more detail, if we inspect the Docker container:
But if we inspect the Podman container:
We can see the Entrypoint for Podman container includes the stock Redpanda
entrypoint.sh
.Why is it important?
It is more correct to override entrypoint this way.
How to test this PR
I have tested this change using Docker, and also using Podman, without changing code under test.
TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE
,TESTCONTAINERS_RYUK_CONTAINER_PRIVILEGED
, andDOCKER_HOST
env vars were set to accommodate proper running of Ryuk, and test environment. I ran into issues #2264 and #538.