Skip to content

Add methods to get and check host address to Container#139

Closed
amarsinghcodes wants to merge 13 commits intotestcontainers:masterfrom
amarsinghcodes:master
Closed

Add methods to get and check host address to Container#139
amarsinghcodes wants to merge 13 commits intotestcontainers:masterfrom
amarsinghcodes:master

Conversation

@amarsinghcodes
Copy link
Copy Markdown

I received direction from @bsideup but this PR is still a work-in-progress. I've bumped the versions and added the url crate as a dependency to parse the key for the DOCKER_HOST process (see Container::set_host ).

why

The point is to add set_host such that the Container object is initialized with a new field corresponding to the host address.

Without this logic, there is no guarantee that the host address is not localhost, and its neglect can lead to careless mistakes that may compromise security.

The reason the host field is added to the Container object is to save future lookups (acting like a cache).

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants