1
0
mirror of https://github.com/moby/moby.git synced 2025-07-30 18:23:29 +03:00

Refactor remote context parsing

Redefine a better interface for remote context dependency.

Separate Dockerfile build instruction from remote context.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi
2017-03-20 15:22:29 -07:00
parent e1101b1295
commit d1faf3df27
22 changed files with 588 additions and 804 deletions

View File

@ -22,13 +22,11 @@ func (s *DockerSuite) TestBuildAPIDockerFileRemote(c *check.C) {
var testD string
if testEnv.DaemonPlatform() == "windows" {
testD = `FROM busybox
COPY * /tmp/
RUN find / -name ba*
RUN find /tmp/`
} else {
// -xdev is required because sysfs can cause EPERM
testD = `FROM busybox
COPY * /tmp/
RUN find / -xdev -name ba*
RUN find /tmp/`
}
@ -45,7 +43,7 @@ RUN find /tmp/`
// Make sure Dockerfile exists.
// Make sure 'baz' doesn't exist ANYWHERE despite being mentioned in the URL
out := string(buf)
c.Assert(out, checker.Contains, "/tmp/Dockerfile")
c.Assert(out, checker.Contains, "RUN find /tmp")
c.Assert(out, checker.Not(checker.Contains), "baz")
}