Fix behavior of absolute paths in .dockerignore#32088
Merged
vdemeester merged 1 commit intomoby:masterfrom Jun 13, 2017
Merged
Conversation
vdemeester
reviewed
Mar 24, 2017
Member
vdemeester
left a comment
There was a problem hiding this comment.
SGTM
/cc @tonistiigi @duglin @thaJeztah
Contributor
Author
|
I'll fix the test regression on Monday |
11fd5c3 to
aec0deb
Compare
According to documentation (https://docs.docker.com/engine/reference/builder/#dockerignore-file), absolute paths like `/foo/bar` should have the same effect as `foo/bar`. This is not the case today. This fix normalize paths when reading the .dockerignore file by removing leading slashes. Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
aec0deb to
1cde87c
Compare
Member
|
ping @duglin @tonistiigi PTAL |
Member
|
cc @duglin |
nakanokurenai
pushed a commit
to nakanokurenai/certbot-dns-conoha
that referenced
this pull request
Jun 19, 2018
I want to use Docker Hub automattic build, top on 17.06. Pathes with leading '/' was available from 17.07.0-ce. That behavor fixed by patch 'Fix .dockerignore entries with a leading / not matching anything' patch. See moby/moby#32088
nakanokurenai
pushed a commit
to nakanokurenai/certbot-dns-conoha
that referenced
this pull request
Jun 19, 2018
I want to use Docker Hub automattic build, top on 17.06. Pathes with leading '/' was available from 17.07.0-ce. That behavor fixed by patch 'Fix .dockerignore entries with a leading / not matching anything' patch. See moby/moby#32088
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #30676
According to documentation (https://docs.docker.com/engine/reference/builder/#dockerignore-file), absolute paths like
/foo/barshould have the same effect asfoo/bar. This is not the case today.This fix normalize paths when reading the .dockerignore file by removing
leading slashes.
- What I did
Fix .dockerignore parsing such that
/foo/baris equivalent tofoo/bar- How I did it
I normalized the .dockerignore patterns in the .dockerignore file reader so that
/foo/baris read asfoo/bar- How to verify it
Unit tests cover that.
- Description for the changelog
Fixed a bug where .dockerignore file entries written as
/foo/barwould not match anything