upserve / docker-api

A lightweight Ruby client for the Docker Remote API
MIT License
1.09k stars 287 forks source link

Fix docker context calculation re: .dockerignore #577

Closed ianfixes closed 3 years ago

ianfixes commented 3 years ago

This patch implements the logic described in the Dockerfile reference for .dockerignore.

Lines starting with ! (exclamation mark) can be used to make exceptions to exclusions. The following is an example .dockerignore file that uses this mechanism:

*.md
!README.md

All markdown files except README.md are excluded from the context.

The placement of ! exception rules influences the behavior: the last line of the .dockerignore that matches a particular file determines whether it is included or excluded. Consider the following example:

*.md
!README*.md
README-secret.md

No markdown files are included in the context except README files other thanREADME-secret.md.

ianfixes commented 3 years ago

@tlunter could you please approve running workflows on this PR so that I can get CI results?

ianfixes commented 3 years ago

@nylkotuby could you please approve running workflows on this PR so that I can get CI results?

nylkotuby commented 3 years ago

@ianfixes I'm no longer a maintainer on this repository, sorry!

ls-todd-lunter commented 3 years ago

@ianfixes approved. Sorry, we've migrated accounts over here so I missed the tag.

ianfixes commented 3 years ago

Thanks to both of you!

Also, small world: Todd I think when I toured Upserve you showed me your Amtrak status tool!

ianfixes commented 3 years ago

I think I need the approval one more time. Whatever you did before must have been tied to a commit... which went away when I force-push my branch.

Added unit tests and fixed the ABC complexity issue.

ianfixes commented 3 years ago

~sorry for the noise, GitHub's webpage keeps changing its mind about whether tests have run or passed~

ianfixes commented 3 years ago

What timeline am I looking at for having this reviewed and (hopefully) released? This is an honest question, not an expression of urgency -- my team is just trying to plan around it.

ls-todd-lunter commented 3 years ago

Released in v2.2.0.

ianfixes commented 3 years ago

Awesome, thank you!