-
-
Notifications
You must be signed in to change notification settings - Fork 547
feat: add socat container #3071
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
Conversation
✅ Deploy Preview for testcontainers-go ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Couple of questions but no blockers.
@stevenh I think this is ready to go 🚀 |
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.
implementation LGTM, just wonder if should be a module or keep it in core
* main: chore: bump golangci-lint to v2 (testcontainers#3082) chore(gcloud): deprecate old gcp containers, creating subpackages for them (testcontainers#3063) fix(mongodb): replica set initialization & connection handling (testcontainers#2984) chore(deps): bump docker/setup-docker-action from 4.2.0 to 4.3.0 (testcontainers#3077) chore(deps): bump github/codeql-action from 3.28.12 to 3.28.13 (testcontainers#3078) chore(deps): bump tj-actions/changed-files from 45.0.4 to 46.0.3 (testcontainers#3076) docs: add dependabot configuration (testcontainers#3074) chore(deps): replace `golang.org/x/exp/slices` with stdlib (testcontainers#3075) fix(dind): use docker image load (testcontainers#3073)
* main: (91 commits) chore(deps): bump github/codeql-action from 3.28.13 to 3.28.15 (testcontainers#3097) chore(deps): bump golang.org/x/crypto from 0.31.0 to 0.37.0 (testcontainers#3098) feat(aerospike): add Aerospike module (testcontainers#3094) security(compose): upgrade github.com/docker/compose/v2 to fix security vulnerability (testcontainers#3095) feat: add more functional options to the modules API (testcontainers#3070) chore(deps): bump golang.org/x/net in /modules/arangodb (testcontainers#3087) feat: add arangodb module (testcontainers#3083) chore(deps): bump actions/upload-artifact from 4.6.0 to 4.6.2 (testcontainers#3086) chore(deps): bump SonarSource/sonarqube-scan-action from 5.0.0 to 5.1.0 (testcontainers#3085) feat: add socat container (testcontainers#3071) fix(mssql): reduce flakiness in tests (testcontainers#3084) chore: bump golangci-lint to v2 (testcontainers#3082) chore(gcloud): deprecate old gcp containers, creating subpackages for them (testcontainers#3063) fix(mongodb): replica set initialization & connection handling (testcontainers#2984) chore(deps): bump docker/setup-docker-action from 4.2.0 to 4.3.0 (testcontainers#3077) chore(deps): bump github/codeql-action from 3.28.12 to 3.28.13 (testcontainers#3078) chore(deps): bump tj-actions/changed-files from 45.0.4 to 46.0.3 (testcontainers#3076) docs: add dependabot configuration (testcontainers#3074) chore(deps): replace `golang.org/x/exp/slices` with stdlib (testcontainers#3075) fix(dind): use docker image load (testcontainers#3073) ...
What does this PR do?
It adds a SOCAT container, a utility container that provides TCP port forwarding and network tunneling between services, enabling transparent communication between containers and networks.
This is particularly useful in testing scenarios where you need to simulate network connections or provide transparent access to services running in different containers.
Why is it important?
It can be used alongside other modules as a helper for network communication
Related issues
Other concerns
Other languages are implementing the socat container as part of the core, and we are discussing about it here too. The socat module in this PR just uses the stdlib plus the
github.com/docker/go-connections/nat
pacakge, so all the pulled packages would already be there when using tc-go.I understand the benefits for having it in the core library, although with the current project layout it would be more difficult to add it directly in the core, without a package to enclose the functionality: we wouldn't use the same APIs for running it as in the modules, with the
socat.Run
function. If in the core, we should: