Skip to content

Fix .dockerignore handling on Windows #893

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

Merged
merged 1 commit into from
Aug 12, 2017
Merged

Fix .dockerignore handling on Windows #893

merged 1 commit into from
Aug 12, 2017

Conversation

orzeh
Copy link
Contributor

@orzeh orzeh commented Aug 8, 2017

When excluding files from build context using patterns defined in .dockerignore file FilePathUtil.relativize() method is used. It changes path separator to / which leads to files not being properly excluded on Windows machines. This PR fixes that issue.

This PR is partially related to #890 and gradle-docker-java plugin issue as it is impossible to exclude subdirectories and/or files on Windows.


This change is Reviewable

@cdancy
Copy link
Contributor

cdancy commented Aug 9, 2017

@orzeh @KostyaSha should we spin off another PR/branch to get this merged into the next point release (3.0.13)?

@KostyaSha
Copy link
Member

Is it possible to cover with some test case?

@orzeh
Copy link
Contributor Author

orzeh commented Aug 9, 2017

@KostyaSha existing test fails on Windows without this fix.

@cdancy
Copy link
Contributor

cdancy commented Aug 9, 2017

@orzeh @KostyaSha one these days, hopefully in the not too distant future, we'll all look back and laugh that folks were ever using windows in the first place ;)

@KostyaSha
Copy link
Member

Could you place comment about windows in code?

@orzeh
Copy link
Contributor Author

orzeh commented Aug 9, 2017

@KostyaSha where? And what should I comment?

@KostyaSha
Copy link
Member

Under this line describing that this required for windows

@orzeh
Copy link
Contributor Author

orzeh commented Aug 12, 2017

@KostyaSha ok, I added comment.

@KostyaSha KostyaSha added this to the 3.1.0 milestone Aug 12, 2017
@KostyaSha
Copy link
Member

and to 3.0.x if needed faster

@KostyaSha KostyaSha merged commit ff99b1e into docker-java:master Aug 12, 2017
@orzeh orzeh deleted the dockerignore-on-windows branch August 13, 2017 20:33
panuse pushed a commit to TuKangTech/docker-java that referenced this pull request Aug 20, 2017
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

Successfully merging this pull request may close these issues.

3 participants