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

fix: resource host for rootless containers #348

Merged
merged 1 commit into from Apr 9, 2022

Conversation

mixedCase
Copy link
Contributor

This fixes resource.GetHostPort and resource.GetBoundIP returning an empty string for the host segment on rootless containers, where "localhost" should be used.

Related issue(s)

Fixes #317

Checklist

  • I have read the contributing guidelines
    and signed the CLA.
  • I have read the security policy.
  • I confirm that this pull request does not address a security
    vulnerability. If this pull request addresses a security vulnerability, I
    confirm that I got green light (please contact
    security@ory.sh) from the maintainers to push
    the changes.
  • I have added tests that prove my fix is effective or that my feature
    works.
  • I have added necessary documentation within the code base (if
    appropriate).

Further comments

I was able to test this fix works by using Hashicorp's Boundary and replacing in go.mod their pinned ory/dockertest with my fork's branch, which allowed it to successfully communicate with a container created using Podman.

@codecov
Copy link

codecov bot commented Mar 24, 2022

Codecov Report

❗ No coverage uploaded for pull request base (v3@d93907d). Click here to learn what that means.
The diff coverage is n/a.

@@          Coverage Diff          @@
##             v3     #348   +/-   ##
=====================================
  Coverage      ?   53.59%           
=====================================
  Files         ?        1           
  Lines         ?      334           
  Branches      ?        0           
=====================================
  Hits          ?      179           
  Misses        ?      118           
  Partials      ?       37           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d93907d...fdb5ee8. Read the comment docs.

@aeneasr
Copy link
Member

aeneasr commented Apr 9, 2022

Awesome, thank you! 🎉 Your contribution makes Ory better :)

@aeneasr aeneasr merged commit 230039c into ory:v3 Apr 9, 2022
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.

GetBoundIP and GetHostPort don't return a host for rootless containers
2 participants