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

Never exclude Dockerfile from the build context. #928

Merged
merged 1 commit into from
Feb 9, 2016

Conversation

shin-
Copy link
Contributor

@shin- shin- commented Feb 9, 2016

Fixes #926

@shin- shin- force-pushed the 926-ignored_dockerfiles branch from b0e6fc7 to 7a0eda3 Compare February 9, 2016 00:49
@shin- shin- added this to the 1.7.1 milestone Feb 9, 2016
# will not descend into it and the file will be skipped. This ensures
# it doesn't happen.
set([dockerfile])
if os.path.exists(os.path.join(root, dockerfile)) else {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I doesn't seem like we do this os.path.exists() check in other places, is it necessary?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and I believe the default should be set() not {}, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If utils.tar() is called on a folder that doesn't contain a Dockerfile, it would break without this change. It doesn't affect docker-py directly I think (we have some tar unit tests that break), but it's part of our public API and some people seem to use it: #865

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, set(). Implicit type cast coming to the rescue obviously :)

@shin- shin- force-pushed the 926-ignored_dockerfiles branch from 7a0eda3 to 90760cf Compare February 9, 2016 20:11
@dnephin
Copy link
Contributor

dnephin commented Feb 9, 2016

LGTM

shin- added a commit that referenced this pull request Feb 9, 2016
Never exclude Dockerfile from the build context.
@shin- shin- merged commit c3a66cc into master Feb 9, 2016
@shin- shin- deleted the 926-ignored_dockerfiles branch March 23, 2016 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants