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

Suggestion: expand default glob for finding dockerfiles and compose-files #90

Closed
andoks opened this issue Jan 22, 2021 · 4 comments
Closed

Comments

@andoks
Copy link

andoks commented Jan 22, 2021

Currently it seems like docker-lock only looks for files called "Dockerfile" (in the case of dockerfiles) and files called "docker-compose.yml" (in the case of docker-compose files). Could it perhaps be a good idea to expand this to also include files that end with ".dockerfile" and ".docker-compose.yml" in cases where projects have multiple of these files in the same directory and need to differentiate them by name?

This is currently covered by the --dockerfile-globs --composefile-globs, so this is not strictly necessary. More a QoL change.

@andoks
Copy link
Author

andoks commented Jan 22, 2021

It seems to update docker-files which are not called "Dockerfile" if they are referenced through a build-stanza in a docker-compose file that it picks up however.

@michaelperel
Copy link
Collaborator

@andoks Currently there are a variety of default paths that are used for Dockerfiles, docker-compose files and kubernetes manifests. These are also used when recursively searching directories. The exact paths are specified in the README.

I think a good solution could be to have a cli flag where you could specify a regex that gets searched, so for your case *.dockerfile.*, or something along those lines.

@andoks
Copy link
Author

andoks commented Jan 25, 2021

@michaelperel: I must have overlooked that, sorry.

I think the existing globs flags already covers the necessary functionality as long as docker-lock stops choking on directories matching the filenames?

@michaelperel
Copy link
Collaborator

@andoks Closing this as I think the more powerful glob syntax in #91 should cover this usecase pretty easily. Thanks!

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

No branches or pull requests

2 participants