Conversation
|
Can you please sign their commits following these rules: https://github.com/dotcloud/docker/blob/master/CONTRIBUTING.md#sign-your-work Each commit in your PR must be signed in the following format: Please rebase and sign each commit. Also, this will need documentation to go with it, |
|
@SvenDowideit yes. Updated. |
There was a problem hiding this comment.
I'm presuming that the relative paths can be files and directories, and some kind of wildcards? Can you tell the reader about how to specify them? (I note that the tar man page punts it to PATTERN - which tells us a little more than just 'list of paths'
There was a problem hiding this comment.
I didn't mention any globbing because there isn't any.
|
ping @shykes How do you feel about his new feature? |
|
I like the idea, but I think it needs globbing. At least |
|
@vieux I didn't want to add the complexity and overhead of globbing. I'd like to see this go in and someone can add globbing in an efficient and reasonable manner later. |
|
Something like |
archive/archive.go
Outdated
There was a problem hiding this comment.
Shouldn't this be "Skipping excluded directory:" ?
|
Added path.Match support for exclusion. |
|
@tmc could you please rebase ? |
|
@vieux yep. |
|
with: It fails, is that normal ? |
|
ping @tmc do you still have that do to this ? could you also add a |
|
+1 we should definitely ".dockerignore" on our repo, and I'd say it should include "bundles" and ".gopath" off the top of my head |
|
Also |
|
Whoa @vieux slow down. "contrib" is 100% necessary in our container, docs is useful (will be more useful in the future), several of those ALL CAPS FILES ("VERSION" especially comes to mind) are useful but don't hurt (they're all tiny), and adding ".git" would completely break @crosbymichael's workflow not to mention our build scripts. So I still stand by my currently two-item list. |
|
@tianon ok I guess I had cache, because I rm |
|
@vieux try building the ubuntu package without contrib ;) |
|
It's ok, I'll have my own |
|
@tmc Can you rebase, please? |
|
I just wanted to jump on and give this another +1 :) |
|
@tianon Thank you for the ping. @tmc Thank you for rebasing. It looks like there are some failures in the tests: |
There was a problem hiding this comment.
can you please link to the rules if they're complicated, or replicate them here if not?
|
Docs LGTM - I just noted some little tweaks - @jamtur01 |
|
I have a bad gut feeling about this, but don't really have the time to think about a better alternative, and since this seems like a popular request I don't want to deal with the whining, so let's do it. I am not guaranteeing this won't break before 1.0. |
|
Hrm. Let's not land this then and make sure we do the right thing. |
|
Breaking this at 1.0 if necessary doesn't seem like a big deal, especially if there's a replacement. This is a major pain for rapid builds and .dockerignore is consistent with .gitignore and .npmignore so +1 to reopen and merge this. |
|
Splitting doesn't appear to be the problem, see comments in tmc#1 |
|
I'm getting some failures in the tests with this PR: |
|
That test is incorrect. See the changes on tmc#1 Still not working overall, there is an issue with multiline dockerignores that still hasn't been resolved, and I haven't had the time yet to track it down. |
|
I'll take a look today |
|
@tmc Hi! Are you here? |
|
@LK4D4 yes? |
|
@tmc There is an error in your PR, you must return SkipDir only for dirs. Do you have time to fix it? And I think we should check that there is no Dockerfile in .dockerignore. Also @wyaeld made PR in your branch with tests. |
|
@LK4D4 I didn't understand enough of what the subtleties were with the issue to be confident in a fix, but I like what you've done in your branch. Also your fakecontext is much nicer that actual fixtures |
|
I've rebased and fixed the SkipDir deal and am incorporating @wyaeld's pr. |
Docker-DCO-1.1-Signed-off-by: Travis Cline <travis.cline@gmail.com> (github: tmc)
|
Alright rebased with docs and tests now. |
|
I think erroring if they try to dockerignore the Dockerfile is ideal. It wasn't intuitive to me until learning from the tests and code that the archive.go step tars the context before trying to build, so excluding the Dockerfile gives you an unbuildable context. |
|
+1 I was talking about this today in IRC. :) |
Fixes moby#2224 Docker-DCO-1.1-Signed-off-by: Travis Cline <travis.cline@gmail.com> (github: tmc)
|
Added Dockerfile ignore erroring and a .dockerignore. |
|
IANTM and have already expressed my +1 ;) |
|
@crosbymichael @unclejack do you agree on this ? If you LGTM I'll carry it to master |
|
@vieux Yes, I think it's going to be useful. |
|
Ah, cool |
Fixes #2224
This improves the archive package's API and reads a
.dockerignorefile as a list of paths to exclude while building the context.