You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature] Need a property to handle default file exclusions while building images #1708
The current behavior of the plugin is to build a Docker archive with default exclusion rules, which exclude hidden files. However, the Docker CLI includes hidden files by default.
Currently there is no properties available to disable the default file exclusions. So, we need a new property to handle the behaviour of the plugin.
changed the title [-]Need a property to handle default file exclusions while building images[/-][+][Feature] Need a property to handle default file exclusions while building images[/+]on Sep 26, 2023
Thanks for the report! Actually I consider this is a bug and I think that hidden files should be always included to mimic the Docker behaviour. So I would probably just change this unconditionally, as adding to the configuration should always be considered carefully as we already have tons of configs.
@rohanKanojia wdyt, would it make sense to include hidden files by default ? I know that this is not necessarily backwards compatible, but we could also add a global property that could be set on the Maven property level like useLegacyDockerBuildFileExclusion (but if this I think is not necessary, because adding hidden files does not really harm except for a slighter worse performance and little security concerns).
Your point is well-founded. However, in certain scenarios, there could arise a necessity to disregard hidden files. If there isn't an available option to manage this behavior, it might pose an issue. I believe it would be beneficial to introduce a Maven property at the very least, as you previously suggested. What are your thoughts on this?
Ok, then let's keep it as is, and let's don't overdo it. I used to always question changes in the configuration surface, just to be sure that we don't inflate that space with options that could be covered otherwise.
Happy with your PR, and as I see, the default is now to exclude hidden files. Since this is a non-backwards compatible change (which I don't think harms a lot), could you please add an entry to the ChangeLog, to indicate that change ?
Activity
[-]Need a property to handle default file exclusions while building images[/-][+][Feature] Need a property to handle default file exclusions while building images[/+]rhuss commentedon Sep 27, 2023
Thanks for the report! Actually I consider this is a bug and I think that hidden files should be always included to mimic the Docker behaviour. So I would probably just change this unconditionally, as adding to the configuration should always be considered carefully as we already have tons of configs.
@rohanKanojia wdyt, would it make sense to include hidden files by default ? I know that this is not necessarily backwards compatible, but we could also add a global property that could be set on the Maven property level like
useLegacyDockerBuildFileExclusion(but if this I think is not necessary, because adding hidden files does not really harm except for a slighter worse performance and little security concerns).thuva9872 commentedon Sep 30, 2023
Hi @rhuss ,
Your point is well-founded. However, in certain scenarios, there could arise a necessity to disregard hidden files. If there isn't an available option to manage this behavior, it might pose an issue. I believe it would be beneficial to introduce a Maven property at the very least, as you previously suggested. What are your thoughts on this?
Thank you
rhuss commentedon Oct 2, 2023
Ok, then let's keep it as is, and let's don't overdo it. I used to always question changes in the configuration surface, just to be sure that we don't inflate that space with options that could be covered otherwise.
Happy with your PR, and as I see, the default is now to exclude hidden files. Since this is a non-backwards compatible change (which I don't think harms a lot), could you please add an entry to the ChangeLog, to indicate that change ?