-
-
Notifications
You must be signed in to change notification settings - Fork 198
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
Remove explicit port binding in Azurite container #876
Remove explicit port binding in Azurite container #876
Conversation
Switched from explicitly binding ports to relying on automatic assignment to avoid manual management of ports. Simplifies configuration and reduces potential conflicts.
✅ Deploy Preview for testcontainers-node ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
{ container: QUEUE_PORT, host: this.queuePort }, | ||
{ container: TABLE_PORT, host: this.tablePort } | ||
); | ||
this.withCommand(command).withExposedPorts(BLOB_PORT, QUEUE_PORT, TABLE_PORT); |
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.
The withExposedPorts
should move to the constructor. If we keep it in the start
method, then it cannot be overridden by users.
You should be able to verify this by re-enabling the should be able to specify custom ports
test and providing
.withExposedPorts(
{ container: BLOB_PORT, host: this.blobPort },
{ container: QUEUE_PORT, host: this.queuePort },
{ container: TABLE_PORT, host: this.tablePort }
);
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.
If developers are allowed to use withExposedPort(), it becomes difficult to create the necessary endpoints as the port order for blob, queue, and table can be set arbitrarily.
Appreciating the existing implementation, the withBlobPort, withQueuePort, and withTablePort functions were modified to accept PortWithOptionalBinding. By using hasHostBinding, it distinguishes whether the port is custom or automatically mapped. Could you review this again? 🙏
Tests failing:
|
|
Fixes #875.
Switched from explicit port binding to automatic assignment to avoid port conflicts.