Commit Graph

253 Commits

Author SHA1 Message Date
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
44c88b9112 Add .docker/config.json and support for HTTP Headers
This PR does the following:
- migrated ~/.dockerfg to ~/.docker/config.json. The data is migrated
  but the old file remains in case its needed
- moves the auth json in that fie into an "auth" property so we can add new
  top-level properties w/o messing with the auth stuff
- adds support for an HttpHeaders property in ~/.docker/config.json
  which adds these http headers to all msgs from the cli

In a follow-on PR I'll move the config file process out from under
"registry" since it not specific to that any more. I didn't do it here
because I wanted the diff to be smaller so people can make sure I didn't
break/miss any auth code during my edits.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 18c9b6c6455f116ae59cde8544413b3d7d294a5e
Component: engine
2015-04-20 13:05:24 -07:00
6f3b598444 Merge pull request #12453 from runcom/style-minor-fixes
Add minor stylistic fixes
Upstream-commit: a7690076c955d242b4590fcf557f15e1029d0c8b
Component: engine
2015-04-20 11:51:04 -07:00
14bae8f05b Merge pull request #12358 from ZJU-SEL/remove_job_from_tag
remove job from tag
Upstream-commit: b1d8ae3824d2902c86d63837b8d413952b546d62
Component: engine
2015-04-19 16:02:28 -04:00
dd5f4141fe remove job from tag
Signed-off-by: Simei He <hesimei@zju.edu.cn>
Upstream-commit: 99f6309b97041bf82cc845340734dc8e47977c8a
Component: engine
2015-04-19 18:36:56 +08:00
41c63ff3d3 Merge pull request #12490 from LK4D4/carry_12396
remove job from pull and import
Upstream-commit: 055c6dbaefc61c597164aaedee4448bc32522b2e
Component: engine
2015-04-17 15:26:30 -04:00
0ff275f7b4 remove job from pull and import
Closes #12396

Signed-off-by: Simei He <hesimei@zju.edu.cn>

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 6e38a53f96403b4cbd38e49e6b294128ed054a20
Component: engine
2015-04-17 09:55:02 -07:00
47592700e5 Add minor stylistic fixes
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 1c89c6ea2f34f51a05215279c9cdefca30bb13b1
Component: engine
2015-04-16 21:22:32 +02:00
884bdce09a Merge pull request #12253 from calavera/remove_job_from_start_and_create
Remove engine.Job from Start and Create
Upstream-commit: de923f59b3860eba2c87e8a533b385ac5752243b
Component: engine
2015-04-15 21:49:25 -04:00