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

easy-init: azd should auto detect port from Dockerfile #4443

Closed
weikanglim opened this issue Oct 16, 2024 · 1 comment · Fixed by #4454
Closed

easy-init: azd should auto detect port from Dockerfile #4443

weikanglim opened this issue Oct 16, 2024 · 1 comment · Fixed by #4454

Comments

@weikanglim
Copy link
Contributor

weikanglim commented Oct 16, 2024

After discussion with @puicchan:

  1. Look in Dockerfile
  2. If EXPOSE with single port is found, use it and don't ask
  3. If EXPOSE is not found, ask the customer.
  4. If more than one port is exposed, prompt for a selection (console.Select) with the multiple ports available, and an "Other" selection to provide the port number.

Multiple ports example:

Select a port number:
- 5050 
- 8080
- Other
@rujche
Copy link
Member

rujche commented Oct 17, 2024

FYI:

  1. PR is coming soon, and the PR is targeting to main branch.
  2. Reference PR: https://github.com/saragluna/azure-dev/pull/10/files

@rujche rujche linked a pull request Oct 17, 2024 that will close this issue
weikanglim pushed a commit that referenced this issue Oct 23, 2024
Use the `EXPOSE` directives in a Dockerfile to default the port configuration for the service. 

- When multiple `EXPOSE` ports are present, we will prompt the user for port selection.
- When no Dockerfile or `EXPOSE` is present, the user will be asked as usual to provide a port number.

Completes #4443
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants