-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add --add-host cli option to expose docker container option with the same name. #6078
Conversation
Docker supports providing host to ip settings via add-host cli option. This change exposes this option similarly and utilizes in docker container creation.
With these fixes, unit tests are aligned to handle add-host cli option and extra_hosts dictionary for Docker container creation.
Thanks for opening this PR! The changes here seem straightforward to me, but I wanted to check in with the team/security first since involves changing the hostname mapping in the containers. |
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.
Sorry about the delay in responses, we have approval to go ahead with this change now.
thanks for the response. I will try to address your requests soon with a revision. |
This change moves add_host parameter parsing into its own type DockerAdditionalHostType .
I made a revision. Please provide any necessary changes to move forward. |
Thanks for making the changes! It looks like Github is saying there is a conflict, can you update your local branch to see what's wrong? When that is done, I can start the checks here on Github to run our tests |
Hi Lucas, I think I fixed the conflict. Is there anything I can do from my end? |
deleting the extra line
Hi, it looks like the make command |
Hi, sorry for the delays, I am not familiar with Github PR workflows. I pulled my repo branch and ran
I just pushed |
I just pushed |
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.
Sorry about the delay in response, thanks for taking the time while we sorted out the comments and the CI checks
Which issue(s) does this change fix?
None
Why is this change necessary?
Docker container support add-host cli option to give additional host to IP mappings. This is useful in doing local testing as we can override DNS resolution and replace some client calls with different endpoints.
How does it address the issue?
This change provides --add-host container related option to the SAM cli and it can be used in local invoke, and start api commands.
What side effects does this change have?
There is none I am aware with respect to unit-tests.
Mandatory Checklist
PRs will only be reviewed after checklist is complete
make pr
passesmake update-reproducible-reqs
if dependencies were changedBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.