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

libcnb-test: Only expose ports to localhost #610

Merged
merged 1 commit into from
Jul 24, 2023

Conversation

edmorley
Copy link
Member

@edmorley edmorley commented Jul 24, 2023

Previously ports exposed using ContainerConfig::expose_port would be exposed to the internet, rather than just localhost.

Sadly the Bollard docs don't mention this pitfall:
https://docs.rs/bollard/latest/bollard/models/struct.PortBinding.html

See:
https://docs.docker.com/engine/reference/commandline/run/#publish
https://docs.docker.com/network/#published-ports

Fixes #609.
GUS-W-13812521.

Previously ports exposed using `ContainerConfig::expose_port` would be
exposed to the internet, rather than just localhost.

See:
https://docs.docker.com/network/#published-ports

Fixes #609.
GUS-W-13812521.
@edmorley edmorley added bug Something isn't working libcnb-test labels Jul 24, 2023
@edmorley edmorley self-assigned this Jul 24, 2023
@edmorley edmorley changed the title libcnb-test: Only expose ports to localhost libcnb-test: Only expose container ports to localhost Jul 24, 2023
@edmorley edmorley marked this pull request as ready for review July 24, 2023 11:25
@edmorley edmorley requested a review from a team as a code owner July 24, 2023 11:25
@edmorley edmorley enabled auto-merge (squash) July 24, 2023 11:30
@edmorley edmorley changed the title libcnb-test: Only expose container ports to localhost libcnb-test: Only expose ports to localhost Jul 24, 2023
@edmorley edmorley disabled auto-merge July 24, 2023 11:31
@edmorley edmorley enabled auto-merge (squash) July 24, 2023 11:31
@edmorley edmorley merged commit 8ed12de into main Jul 24, 2023
6 checks passed
@edmorley edmorley deleted the edmorley/expose-port-localhost branch July 24, 2023 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working libcnb-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

libcnb-test: ContainerConfig::expose_port exposes ports to the internet
2 participants