Skip to content

[Feature] Need a property to handle default file exclusions while building images #1708

Closed

Description

@thuva9872

Description

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.

Activity

  1. 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
  2. rhuss commented on Sep 27, 2023

    @rhuss
    Collaborator

    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).

  3. thuva9872 commented on Sep 30, 2023

    @thuva9872
    ContributorAuthor

    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

  4. rhuss commented on Oct 2, 2023

    @rhuss
    Collaborator

    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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions