Commit Graph

261 Commits

Author SHA1 Message Date
9a58f60656 Merge pull request #13833 from Microsoft/10662-dockerbuild
Windows: Start docker build working
Upstream-commit: d5721f03854f33300f84186554321c3371a28319
Component: engine
2015-06-23 11:46:56 -07:00
4992f31e42 Merge pull request #14071 from mavenugo/mhnet
Vendoring libnetwork 83743db8ceb2bdbfa0960d9a54ed2f98df4ea846
Upstream-commit: f39b9a0b0f77c528a6fb8bf14be5cdea11ce338d
Component: engine
2015-06-22 08:35:18 -07:00
aa388c828f Removed the default "bridge" in builder
Now that the default network mode is "default" and this mode is chosen
even if the mode is empty string, it is not correct to have builder
still pointing to "bridge" as default (though this is daemon default).

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: 53b0f686f7ee338819e568413fd9daf9c3811d68
Component: engine
2015-06-22 04:15:56 -07:00
265055473c Support downloading remote tarball contexts in builder jobs.
Signed-off-by: Moysés Borges <moysesb@gmail.com>
Upstream-commit: d48bface59ef28aedc692c1f7c51a7ddde94a7fe
Component: engine
2015-06-19 16:35:00 -03:00
84f0d29cf2 Windows: Docker build starting to work
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 3c177dc8777e76b4913294d17da4eac30edbd8db
Component: engine
2015-06-17 10:41:28 -07:00
57eb64c9c0 Carry of PR #13520
Removinig files

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: cd44018856be421497a35d96f88dd0eec42fae43
Component: engine
2015-06-13 09:27:30 -07:00
e778cd68a0 [builder] Make build cache ignore mtime
Build cache uses pgk/tarsum to get a digest of content which is
ADD'd or COPY'd during a build. The builder has always used v0 of
the tarsum algorithm which includes mtimes however since the whole
file is hashed anyway, the mtime doesn't really provide any extra
information about whether the file has changed and many version
control tools like Git strip mtime from files when they are cloned.

This patch updates the build subsystem to use v1 of Tarsum which
explicitly ignores mtime when calculating a digest. Now ADD and
COPY will result in a cache hit if only the mtime and not the file
contents have changed.

NOTE: Tarsum is NOT a meant to be a cryptographically secure hash
function. It is a best-effort approach to determining if two sets of
filesystem content are different.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 0e10507a1c5985e6fda0ff48e9313ba7a4de761b
Component: engine
2015-06-08 13:54:47 -07:00
6aab6b5654 Avoid nil pointer dereference while creating a container with an empty Config
Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: 4ce817796e639391f6bc3e338f5a88985daacaca
Component: engine
2015-06-06 20:07:32 +02:00
6226136075 Remove PortSpecs from Config
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 15134a3320fbacee36e86a0342e7ffb49285f297
Component: engine
2015-05-29 22:38:09 +02:00
570b91cfd7 Merge pull request #13055 from Microsoft/10662-internalsfixperms
Windows: Fixup builder/internals.go
Upstream-commit: 33c7c01a62390d55c4433ad45dd4632cf7112f81
Component: engine
2015-05-28 12:31:45 -04:00
2b42c2c199 Cleanup container rm funcs
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: f8628ba89104385071e811d0b21293d7cd2e8e01
Component: engine
2015-05-26 15:38:52 -04:00
89782c55eb Volumes refactor and external plugin implementation.
Signed by all authors:

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Signed-off-by: David Calavera <david.calavera@gmail.com>
Signed-off-by: Jeff Lindsay <progrium@gmail.com>
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Signed-off-by: Luke Marsden <luke@clusterhq.com>
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 81fa9feb0cdc0773eff99d7393c16271e84aac08
Component: engine
2015-05-21 20:34:17 -07:00
34fbb3e5d5 Windows: Fixup builder\internals.go
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 010e3e046b3d31ab69f37dfb504551fe5042d84a
Component: engine
2015-05-20 08:55:13 -07:00
b3f4af8971 builder/internals: set up network as bridge
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: d6a545a989109d3a76e8dfb4cfc0e4f9c88cd3c4
Component: engine
2015-05-15 22:58:21 +03:00
71c213ec0b Merge pull request #13131 from Microsoft/10662-loadonwindows
Windows: Build load.go
Upstream-commit: 3985f1781228d6060228d83e559f14e6d7cc9d7c
Component: engine
2015-05-12 18:04:33 -07:00
aeecef0f70 Refactor pkg/stremformatter with custom constructors instead of passing a boolean
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 6b700bdacae0b416d8239a0a24729fe327d425d1
Component: engine
2015-05-13 00:09:41 +02:00
aaf186c8e8 Windows: Build load.go
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: aed8f9f76e16ed7acc49fbdef5f4563834ac5167
Component: engine
2015-05-12 14:26:57 -07:00
ac35a75674 Merge pull request #13160 from runcom/remove-api-codepath-less-than-1-12
Remove API codepaths < 1.12
Upstream-commit: f35038dfba2bae0f2183a0caa366e8d7cb959220
Component: engine
2015-05-12 13:08:36 -07:00
b33908cc47 Merge pull request #13105 from duglin/FixRunOutput
Fix RUN err msg (again)
Upstream-commit: 73387bf15a3f3a35192cb78aefa5c32e1569cb5c
Component: engine
2015-05-12 11:36:55 -07:00
4a0ddadbc0 Remove API codepaths < 1.12
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 7284b08204fb85838170bdf82e2c379e1a4713c9
Component: engine
2015-05-12 20:09:49 +02:00
a9a448c762 Merge pull request #12994 from Microsoft/10662-fixinvocation
Windows: Fix builder\dispatchers.go
Upstream-commit: e66ad40c4e62d784e23e0df39de0970c5ced3917
Component: engine
2015-05-11 11:24:43 -07:00
52da2e9683 Fix RUN err msg (again)
Previous fix used %q which incorrectly go-escaped things. For example:

```
RUN echoo A \& B	C
```
would result in the user seeing:
```
INFO[0000] The command '/bin/sh -c echoo A \\& B\tC' returned a non-zero code: 127
```
Note the double-\ and the \t instead of a tab character

The testcase had to double escape things due to logrus getting in the way
but I'm going to fix that in another PR because its a change to the UX.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 006c066b6ce0b8b16f7d68b0ef997717bfb35662
Component: engine
2015-05-09 09:22:30 -07:00
560ba9b809 add cpu.cfs_period_us support
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Upstream-commit: dccb8b5c339e218222bae4ce74bbeccb9e020c82
Component: engine
2015-05-09 10:02:46 +08:00
669b8fe47b Windows: Fix builder\dispatchers.go
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 4d2f6fbde012f6b58345cc21eadcd619db83b292
Component: engine
2015-05-08 11:45:08 -07:00
f08d29d6d6 Merge pull request #12278 from duglin/12267-Wildcards
Fix for Daemon crashing when wildcards are used for COPY/ADD
Upstream-commit: d0bc0153c637f0e61207fa90b0346174cd5e92e3
Component: engine
2015-05-07 17:01:16 -07:00
d7923211b9 Remove unused Dockerfile instruction INSERT
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 596e91638cbe8b583dff4fdfc5a52e9d3840b20f
Component: engine
2015-05-06 16:26:43 -07:00
309bf49758 Fix RUN's error msg when it fails
When RUN returns with a non-zero return code it prints the command
that was executed as a Go []string:
```
INFO[0000] The command &{[/bin/sh -c noop a1 a2]} returned a non-zero code: 127
```

instead it should look like this:
```
INFO[0000] The command "/bin/sh -c noop a1 a2" returned a non-zero code: 127
```

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 54662eae10923a0aca03ffddc1a30b7d25431c79
Component: engine
2015-05-05 16:08:41 -07:00
ba0c92d010 Fix issue where build steps are duplicated in the output
This fixes an issue where the build output for the "Steps" would look like:
```
Step 1: RUN echo hi echo hi
```
instead of
```
Step 1: RUN echo hi
```

Also, I noticed that there were no checks to make sure invalid Dockerfile
cmd flags were caught on cmds that didn't use cmd flags at all. They would
have been caught on the cmds that had flags, but cmds that didn't bother
to add a new code for flags would have just ignored them.  So, I added
checks to each cmd to flag it.

Added testcases for issues.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 08b7f30fcd050244026098673b19700485308b5a
Component: engine
2015-05-05 15:28:42 -07:00
f6876820fd Merge pull request #11844 from jbarbier/cgroup-parent-42
Adding cgroup-parent option for docker build
Upstream-commit: e960e4bb129de15b3beb7da37421e32af8dccf2f
Component: engine
2015-05-05 14:46:47 -07:00
3660faa6b0 Merge pull request #10775 from duglin/BuilderFlags
Add support for Dockerfile CMD options
Upstream-commit: 9c32cd1cef6bd95d6f2a32d18756d6087ad8fa0c
Component: engine
2015-05-04 11:39:09 -07:00
12da32d151 Merge pull request #11190 from cyphar/expose-path-sanitisation-wrappers
Expose the getResourcePath and getRootResourcePath wrappers.
Upstream-commit: d2f0b9ed976987576483387bc919cb7ffbfa38e8
Component: engine
2015-04-28 18:45:36 -04:00
d887efe03f Add support for Dockerfile CMD options
This adds support for Dockerfile commands to have options - e.g:
   COPY --user=john foo /tmp/
   COPY --ignore-mtime foo /tmp/

Supports both booleans and strings.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: a8e871b0bbbb63310f372332176875ffcc01aaf6
Component: engine
2015-04-28 05:28:46 -07:00
741aa30caf Fix for Daemon crashing when wildcards are used for COPY/ADD
in the filename and the command itself

Closes #12267

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 82daa43844556953101b201bc5983aed4fbe6233
Component: engine
2015-04-27 19:09:57 -07:00
0b5b481a6d Merge pull request #12828 from tdmackey/trivial-spelling
trivial: typo cleanup
Upstream-commit: 0153edcda1527cd19f5952046b51c4e8358d01ed
Component: engine
2015-04-27 17:05:46 -04:00
ae74d9f34f trivial: typo cleanup
Signed-off-by: David Mackey <tdmackey@booleanhaiku.com>
Upstream-commit: 3941623fbc3fa724d61f53121513ffd87d03b61c
Component: engine
2015-04-27 13:35:08 -07:00
954f940156 Small if err cleaning
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 844538142d95c1b7dda1bb2903179510105fe9b5
Component: engine
2015-04-27 21:50:33 +02:00
e5f7f8da6f Replace json.Unmarshal with json.Decoder().Decode()
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 26543e03095eaa45d9afc12c029f07539323fee5
Component: engine
2015-04-26 15:02:01 +02:00
7a068916d5 Happy birthday Docker! cgroup-parent option for docker build. Thanks to Michael, Nathan and Jessie for their support! #42
Signed-off-by: Julien Barbier <write0@gmail.com>
Upstream-commit: bb411939989dabb56eb604b9a873d1dfbf0646ef
Component: engine
2015-04-25 15:25:51 -04:00
cc66f7a04e Merge pull request #12502 from calavera/shallow_git_history
Shallow clone using git to build images.
Upstream-commit: 790c63a5ef34d54ae8ba79886b6c8daae547bf25
Component: engine
2015-04-24 10:16:01 -07:00
dfd9ef2b64 Remove duplicated git clone logic.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 1cfb307d70558110e8e88a7391ae0e6cf6ebf174
Component: engine
2015-04-24 09:39:45 -07:00
44cdfe63b1 Test that we set the right arguments for git cloning depending on the transport.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 3117bf3ef562bc43ef007d8afe3815c58aac6e85
Component: engine
2015-04-24 09:39:38 -07:00
d5b0b24bb8 Do not try to shallow git history when the protocol doesn't allow it.
This only happens with the old git http dumb protocol, but that's what we use in our integration tests.
We check the Content-Type header advertised in http requests to make sure the http transport is the git smart transport:

See this commit as a reference:
4656bf47fc

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 9fb7204a41804131c2492f9d50d7451e123a05e5
Component: engine
2015-04-24 09:39:38 -07:00
3c2cab11aa Shallow clone using git to build images.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 36fbf4b86469ca6fe3677d47c9a1976bcdd111e4
Component: engine
2015-04-24 09:39:38 -07:00
f124bc620f *: switch to Get(Root)?ResourcePath where appropriate
Several parts of the codebase didn't use the correct path sanitisation
wrappers. Now that the wrappers have been exposed, use those.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (github: cyphar)
Upstream-commit: b7c3c0cb6988c9a7864649bfe458217336c5fc51
Component: engine
2015-04-25 00:10:29 +10:00
734115a06e Add cpu cfs quota to build
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 5f4fb8be006c0ffeff2671e5752111e543e07d9f
Component: engine
2015-04-24 08:54:08 +08:00
c8f1332dce Move CLI config processing out from under registry dir
No logic changes should be in here, just moving things around.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: bb9da6ba9294a8eab8f4dfaf7cf07c57959fe608
Component: engine
2015-04-23 10:18:38 -07:00
43e79cc411 Remove chain of engine passing from builder to loadManifest
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: a2f74aa4b449479dc3953b129c839ca90b089494
Component: engine
2015-04-21 14:55:23 -07:00
16569396d9 Remove engine.Job from builder.CmdBuildConfig.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: ae4063585e7936780154101f7fe416a080c6ff7c
Component: engine
2015-04-20 13:37:06 -07:00
a618f11507 Remove engine.Job references from builder.CmdBuild
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 9a2c00975123c17033ac7b50762af82051ec73db
Component: engine
2015-04-20 13:37:04 -07:00
d6cf7ae01f Merge pull request #12009 from duglin/AddConfig
Migrate .dockercfg to .docker/config.json and support for HTTP Headers
Upstream-commit: 08ef006d178b7a869c9dfc05c8b887316a856445
Component: engine
2015-04-20 13:12:17 -07:00