Commit Graph

281 Commits

Author SHA1 Message Date
59df5a01ec make docker compile on freebsd
Signed-off-by: Alexey Guskov <lexag@mail.ru>
Upstream-commit: 26c03d561ab126287bb3034cc23477d18869a888
Component: engine
2015-07-29 21:25:56 +03:00
3d5c90498b Merge pull request #14759 from vdemeester/pkg-golint
golint on some pkg/* packages
Upstream-commit: 25c42cc0d0a83325817e5fdb8fa654c9e5ab54d5
Component: engine
2015-07-27 15:19:46 -07:00
2db54e3ac2 Lint on pkg/* packages
- pkg/useragent
- pkg/units
- pkg/ulimit
- pkg/truncindex
- pkg/timeoutconn
- pkg/term
- pkg/tarsum
- pkg/tailfile
- pkg/systemd
- pkg/stringutils
- pkg/stringid
- pkg/streamformatter
- pkg/sockets
- pkg/signal
- pkg/proxy
- pkg/progressreader
- pkg/pools
- pkg/plugins
- pkg/pidfile
- pkg/parsers
- pkg/parsers/filters
- pkg/parsers/kernel
- pkg/parsers/operatingsystem

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 18c7c67308bd4a24a41028e63c2603bb74eac85e
Component: engine
2015-07-27 21:26:21 +02:00
b61648e148 Lint fixes on runconfig
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 5170a2c096ff64d4bfbe0fab296ec6777c412bc3
Component: engine
2015-07-27 21:23:15 +02:00
Lei
b278b668e9 Add ulimit to docker build.
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 877dbbbde8aaf6583a81d9946e4c83db8e356b1a
Component: engine
2015-07-23 10:26:06 +08:00
43c8d7a97f Fix golint warnings for builder
Addresses: #14756

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 8c4a282a5719455cb5c63b917deb2a2042eed685
Component: engine
2015-07-22 13:29:03 +08:00
b70343dc2b Fixing Image struct to no longer use Graph.
Signed-off-by:  John Howard <jhoward@microsoft.com>
Upstream-commit: 9001ea26e7821239207586ad23c78c67d6926bfc
Component: engine
2015-07-20 13:59:53 -07:00
371476f565 fix 8926: rmi dangling is unsafe when pulling
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 1b67c38f6f4a709e1d159445b56f0beee8cfad3a
Component: engine
2015-07-17 11:39:57 -04:00
4f73cb3ecd Cleanup build tmp dir stuff
If there's an error while unpacking the build context then we weren't erasing
the tmp dir created to persist the context.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 13c08b898b1ad26dda2900c90314afa0bd2d3a1f
Component: engine
2015-07-15 06:23:19 -07:00
737b8d4b0e Windows: Fix builder
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 2ceb1146078f900a686019398a94d113943beeb9
Component: engine
2015-07-12 09:06:18 -07:00
e92413dd0d Merge pull request #14371 from Microsoft/10662-graphdriver
Windows: Graph driver implementation
Upstream-commit: 4aeb84612f530d01e0b4f5b3fff40d2a6978f6f4
Component: engine
2015-07-10 15:35:00 -07:00
1296feade8 Windows: Graph driver implementation
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 52f4d09ffb376ffaa6677cb1e0413c6a97f53f24
Component: engine
2015-07-10 14:33:11 -07:00
5b5bcdcb21 Align 'docker commit' docs with the code
It was missing some variants and 'maintainer' isn't actually supported.
Also sorted the list of allowed cmds in the code just to make it easier
to diff with the docs.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 0bf0e5a6efb6d4718f18db11084295aaba2062e3
Component: engine
2015-07-09 13:17:47 -07:00
576b04d570 Merge pull request #13744 from turtlebender/feature/whitelist-label-for-commit
Support LABEL as change for `docker commit`
Upstream-commit: 53b897ce9c1f815a047682edb4ca54baea395a64
Component: engine
2015-07-01 10:57:33 -07:00
9161e24479 Move /nat to /pkg/nat
By convention /pkg is safe to use from outside the docker tree, for example
if you're building a docker orchestrator.

/nat currently doesn't have any dependencies outside of /pkg, so it seems
reasonable to move it there.

This rename was performed with:

```
gomvpkg -vcs_mv_cmd="git mv {{.Src}} {{.Dst}}" \
	-from github.com/docker/docker/nat \
        -to   github.com/docker/docker/pkg/nat

```

Signed-off-by: Peter Waller <p@pwaller.net>
Upstream-commit: 9c2374d19623581028f070bc93fa4c60a660dce4
Component: engine
2015-06-30 17:43:17 +01:00
a8c9aef74e Merge pull request #14061 from runcom/clean-builder-daemon-config
Add struct to configure Builder commit
Upstream-commit: d543a01e17ace181261dd7809bbeec0c6580b867
Component: engine
2015-06-29 11:04:05 -07:00
3c4d6e026e Merge pull request #14139 from jlhawn/fix_build_with_auth
[api, builder] Fix build auth config
Upstream-commit: dd408891baff5cd820f917a001364add35f5f878
Component: engine
2015-06-25 17:39:36 -07:00
aa8bc7e1e7 [api, builder] Fix build auth config
With the 1.7 release, we introduced a change to how we store registry
credentials, but the build API endpoint did not expect a change in the format
of that file. This patch fixes this problem so that you can again pull private
images during `docker build`.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 02c7bbefb8841e5e86a4b9d467defa668e3ea613
Component: engine
2015-06-23 12:58:17 -07:00
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
681944f56f Add struct to configure Builder commit instead of using one defined in daemon
Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: 7046651b87c0c028d010881abbb05a8f0c28ddfa
Component: engine
2015-06-20 12:53:47 +02: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
8124231ae2 just adding label to whitelist for commit command (Fixes #13738)
Signed-off-by: Tom Howe <turtlebender@gmail.com>
Upstream-commit: 6e2662b3bad319679e17fe25d410f246820ab0e9
Component: engine
2015-06-16 13:59:16 -05: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