redhat-developer / alizer

⛔️ DEPRECATED - Application analyzer toolkit, use https://github.com/devfile/alizer instead
Apache License 2.0
12 stars 17 forks source link

Enhance dockerfile port detection logic #235

Closed thepetk closed 1 year ago

thepetk commented 1 year ago

Which area this feature is related to?

/area cli /area library

Which functionality do you think we should add?

Why is this needed? Is your feature request related to a problem?

In order to enhance port detection logic, there is a need to improve the logic around the dockerfiles.

Detailed description: An example case where we should had a proper port detection is https://github.com/christianvogt/ocparcade/tree/main/epicpinball. In this case we are able to detect a component in the inner epicpinball but we are not able to detect any ports, while the outer epicpinball dir has a dockerfile

Describe the solution you'd like

A solution could be to detect a dockerfile as a separate component for this cases

Describe alternatives you've considered

As alizer has many clients maybe this solution could be configurable (it could change according to params we pass to each function

Additional context

As this issue demands an in-depth solution we might need to add a proposal

Related Issues

Child issues for this EPIC:

mike-hoang commented 1 year ago

Exploring the case where a dockerfile can be detected as a separate component and will continue to investigate whether this approach will work.

To ensure that inner dockerfiles (ones that are within found components) aren't effected, we can introduce a new field in the languages-customization.yml.

e.g.

Dockerfile:
  configuration_files:
    - "[Dd]ockerfile"
  orphan_component: true
thepetk commented 1 year ago

I was wondering if it could be a good idea to add a proposal, as it might affect the behavior of alizer? Wdyt?

mike-hoang commented 1 year ago

Changed issue to EPIC, and adding proposal creation as a child issue

thepetk commented 1 year ago

closing in favor of https://github.com/devfile/api/issues/1159