Commit Graph

1381 Commits

Author SHA1 Message Date
9abcd15501 Windows: Daemon build is broken
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: b43dc0d93c3678c3fe5e6247aa19a2bf71ef35d6
Component: engine
2015-07-29 20:08:51 -07:00
01ea6979df Merge pull request #15126 from LK4D4/global_rand
Use global random *rand.Rand instance in pkg
Upstream-commit: 4c7cf30260eac73f8bfe31fcc4450216965e224c
Component: engine
2015-07-29 17:36:25 -07:00
197e6f60b8 Merge pull request #15040 from vbatts/vbatts-double-decompress-fix
archive, graphdriver: double decompress fix
Upstream-commit: 8724e8953d446ade61856d4944126ffccb2aead9
Component: engine
2015-07-29 16:48:02 -07:00
4cd45101c0 Merge pull request #13542 from kvasdopil/freebsd-work
Make docker build on FreeBSD
Upstream-commit: 75f8bdd970e5355a6238e7b41a9f1aee9cd3f890
Component: engine
2015-07-29 15:15:37 -07:00
abf825af14 Merge pull request #15111 from Microsoft/fix-archive-copy-log
Fix log to logrus
Upstream-commit: c09c497c71e3fbcec6fee6ee0f4eb5097fc1b4b7
Component: engine
2015-07-29 14:48:19 -04:00
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
a7dc60d0d3 Fix log to logrus
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 2bf73c4b1a3b195ee426e74d221a9df032aaa89e
Component: engine
2015-07-29 09:58:07 -07:00
7dccd4ea15 Use global random *rand.Rand instance in pkg
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 51cdcf3c9df04a34945c976cfe2bdbad6fee122a
Component: engine
2015-07-29 09:30:48 -07:00
67bf5ba305 Replace GenerateRandomID with GenerateNonCryptoID
This allow us to avoid entropy usage in non-crypto critical places.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 6bca8ec3c9ccc169c53b3d7060fe5c8ba8670aac
Component: engine
2015-07-28 22:31:01 -07:00
5ca33487e4 Add GenerateNonCryptoID function to avoid entropy exhaustion
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 4553b6af4badd3e182204ed2178348b894688460
Component: engine
2015-07-28 22:31:01 -07:00
6876cc1bf2 Add global instance of *(math/rand).Rand and Reader
You can read random bytes from Reader without exhausting entropy.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 6963b9c71694509d8511264655f05c203f5b8f97
Component: engine
2015-07-28 22:30:57 -07:00
abb741354a archive, chrootarchive: split out decompression
In `ApplyLayer` and `Untar`, the stream is magically decompressed. Since
this is not able to be toggled, rather than break this ./pkg/ API, add
an `ApplyUncompressedLayer` and `UntarUncompressed` that does not
magically decompress the layer stream.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 56bf275e32fc27bd31c5dba6b715336b43981695
Component: engine
2015-07-28 16:36:38 -04:00
3f76e1b38f Fix golint for pkg/mflag
Signed-off-by: Félix Cantournet <felix.cantournet@cloudwatt.com>
Upstream-commit: 8e6ad2171a2fbf51d127326c215608475c031b41
Component: engine
2015-07-28 15:32:42 +02:00
6ceeb0ed2b Fix golint nit in term_windows.go
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 35e498beca13de4ef8cecf45c0d132cc38daf0d5
Component: engine
2015-07-27 17:40:49 -07:00
809c751de2 Merge pull request #14838 from Microsoft/10662-ansirewrite
Windows: CLI Improvement (TP3)
Upstream-commit: 33358f80e592686bb1872d9d50a4dd1e0391487f
Component: engine
2015-07-27 17:30:14 -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
1237e8ea97 Merge pull request #14959 from runcom/remove-pkg-systemd-booted-go
Remove pkg/systemd/booted.go
Upstream-commit: b48b6de623cb45509e4cf45d3b5b1b5d29a7e9d9
Component: engine
2015-07-27 10:22:58 -07:00
7eed677896 *: s/direcotry/directory/g typo
Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 7b4e6fc47b5b4b25f74f12419005098478e16ce7
Component: engine
2015-07-27 11:29:28 -04:00
861b01ab9e Fix go vet errors
Signed-off-by: Chris Seto <chriskseto@gmail.com>
Upstream-commit: 04f76b67c9f0a4559ef91e24873f51b81c81b957
Component: engine
2015-07-25 17:00:10 -04:00
7e6fe45a4f Use notary library for trusted image fetch and signing
Add a trusted flag to force the cli to resolve a tag into a digest via the notary trust library and pull by digest.
On push the flag the trust flag will indicate the digest and size of a manifest should be signed and push to a notary server.
If a tag is given, the cli will resolve the tag into a digest and pull by digest.
After pulling, if a tag is given the cli makes a request to tag the image.

Use certificate directory for notary requests

Read certificates using same logic used by daemon for registry requests.

Catch JSON syntax errors from Notary client

When an uncaught error occurs in Notary it may show up in Docker as a JSON syntax error, causing a confusing error message to the user.
Provide a generic error when a JSON syntax error occurs.

Catch expiration errors and wrap in additional context.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: ed13c3abfb242905ec012e8255dc6f26dcf122f6
Component: engine
2015-07-24 14:08:20 -07:00
03bf3f7ef9 Remove pkg/systemd/booted.go
Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: f29dcfd215ae3b3aafda4104339e173b6894544e
Component: engine
2015-07-24 18:09:27 +02:00
d7e24680cc reexec: Use in-memory binary on linux instead of os.Args[0]
This keeps reexec working properly even if the on-disk binary was replaced.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 5aee8807a67687941916fc85c6d4da6bc59e834b
Component: engine
2015-07-24 14:15:50 -04:00
12234c67d4 cli: new daemon command and new cli package
This patch creates a new cli package that allows to combine both client
and daemon commands (there is only one daemon command: docker daemon).

The `-d` and `--daemon` top-level flags are deprecated and a special
message is added to prompt the user to use `docker daemon`.

Providing top-level daemon-specific flags for client commands result
in an error message prompting the user to use `docker daemon`.

This patch does not break any old but correct usages.

This also makes `-d` and `--daemon` flags, as well as the `daemon`
command illegal in client-only binaries.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 96ce3a194aab2807fdd638825b9ea7cb9ba55c36
Component: engine
2015-07-23 19:44:46 -04:00
c56f8c4097 Enable validate-lint as part of CI
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: bc8b8e03b48bf1ef6ce6b67271948e4a20c2ed31
Component: engine
2015-07-22 15:23:34 -07:00
ec7391b794 Merge pull request #14442 from cpuguy83/refactor_logdrvier_reader
Refactor log driver reader
Upstream-commit: 1c6fe58efc413b606b6b24e42584ca14be2d1ca8
Component: engine
2015-07-22 11:54:35 -07:00
e1e5cbd789 pkg: mount: golint
Fix the following warnings:

pkg/mount/mountinfo.go:5:6: type name will be used as mount.MountInfo by other packages, and that stutters; consider calling this Info
pkg/mount/mountinfo.go:7:2: struct field Id should be ID

Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: 0f5c9d301b9b1cca66b3ea0f9dec3b5317d3686d
Component: engine
2015-07-22 10:26:10 +02:00
9c4a1f92a0 Merge pull request #14804 from dave-tucker/golint_nat
golint: Fix issues in pkg/nat
Upstream-commit: ff011ededba4b51c047a9f8d27c7c5c327494c0d
Component: engine
2015-07-21 20:38:40 -07:00
8365f62c47 Merge pull request #14822 from runcom/host-config-links-on-start
Allow starting a container with an existing hostConfig which contains links
Upstream-commit: 06162fed8b12d4f43ca3d03d6956996b6c73015d
Component: engine
2015-07-21 20:06:26 -07:00
6e5f69c519 remove dead code after decoupling from jsonlog
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: d3b3ebc3a4e185da08ec049bbeba46e942f30c80
Component: engine
2015-07-21 20:47:35 -04:00
5104b34c44 Split reader interface from logger interface
Implement new reader interface on jsonfile.
Moves jsonlog decoding from daemon to jsonfile logger.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: c0391bf5545afef5e675138556c39e4c0e9bf91b
Component: engine
2015-07-21 20:47:31 -04:00
8f8c0a2957 Merge pull request #13171 from jlhawn/archive_copy
docker cp to and from containers
Upstream-commit: c986f85f7397c915e6b29b6dff60db678cc8b72d
Component: engine
2015-07-21 16:59:44 -07:00
89ab877e9d golint: Fix issues in pkg/nat
Updates #14756

Signed-off-by: Dave Tucker <dt@docker.com>
Upstream-commit: 15d01d6e6c57f4b8a39dddd2676a2d6914c62c77
Component: engine
2015-07-22 00:47:41 +01:00
364910e844 Windows: CLI Improvement
The Ansi parser and their associated actions have been decoupled. Now
parsing results in call backs to an interface which performs the
appropriate actions depending on the environment.

This improvement provides a functional Vi experience and the vttest no
longer panics.

This PR replaces docker/docker #13224 with the latest console updates.

Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: c923774c41678e4044081a87ec5841173d9577e7
Component: engine
2015-07-21 16:38:44 -07:00
8fccdeffc8 Merge pull request #14682 from duglin/Issue14621
Remove panic in nat package on invalid hostport
Upstream-commit: 36106a20cacb8f96b64da303f651bbd2160e24e3
Component: engine
2015-07-21 15:48:51 -07:00
4ca43d5b83 Merge pull request #14805 from dave-tucker/golint_namesgen
golint: Lint pkg/namesgenerator
Upstream-commit: c88ce893a56a67c26a46baee8c9511a0c3ef6584
Component: engine
2015-07-21 13:45:31 -07:00
acbea7273b Allow starting a container with an existing hostConfig which contains links
Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: 65121e5fce3851d7d1e8c8cd5d77dd3c9591d773
Component: engine
2015-07-21 22:10:00 +02:00
cea3f16dbe pkg/archive: new utilities for copying resources
Adds TarResource and CopyTo functions to be used for creating
archives for use with the new `docker cp` behavior.

Adds multiple test cases for the CopyFrom and CopyTo
functions in the pkg/archive package.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: a74799b701f5a70e964ec528c6d731c8c93019e6
Component: engine
2015-07-21 11:03:25 -07:00
0236ca4bfe Merge pull request #13617 from Microsoft/10662-sql
Windows: Statically linkable SQLite3
Upstream-commit: 943bf44686f18e2888a2a9b986d787e6ed728986
Component: engine
2015-07-21 10:12:40 -07:00
f8dc4be64b Windows: Statically linkable SQLite3
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 10bcaca914b32af29d8ce9974c5f5656a2f8cc1d
Component: engine
2015-07-21 09:33:46 -07:00
a0b92d8385 golint: Lint pkg/namesgenerator
Also addded a couple more tests

Updates #14756

Signed-off-by: Dave Tucker <dt@docker.com>
Upstream-commit: c5667bc5690d6004db4e515cef1865e093da7e3b
Component: engine
2015-07-21 16:33:34 +01:00
a69da4951f Merge pull request #14762 from LK4D4/lint_reexec
Add docstring to reexec.Command
Upstream-commit: 4d0990a753abbf1c7709dec7ea48a74ff87845fd
Component: engine
2015-07-20 20:37:27 -04:00
2f038465a8 Add docstring to reexec.Command
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 9738b9319b7a5133653c4912db8ec361af5847fc
Component: engine
2015-07-20 17:00:18 -07:00
0388c1eb6b move nat tests from container's unit test to nat's ones
Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: f2aff584830db5257489bcf76a4b364b79534b77
Component: engine
2015-07-21 00:29:24 +02:00
a9efb7a3af Remove panic in nat package on invalid hostport
Closes #14621

This one grew to be much more than I expected so here's the story... :-)
- when a bad port string (e.g. xxx80) is passed into container.create()
  via the API it wasn't being checked until we tried to start the container.
- While starting the container we trid to parse 'xxx80' in nat.Int()
  and would panic on the strconv.ParseUint().  We should (almost) never panic.
- In trying to remove the panic I decided to make it so that we, instead,
  checked the string during the NewPort() constructor.  This means that
  I had to change all casts from 'string' to 'Port' to use NewPort() instead.
  Which is a good thing anyway, people shouldn't assume they know the
  internal format of types like that, in general.
- This meant I had to go and add error checks on all calls to NewPort().
  To avoid changing the testcases too much I create newPortNoError() **JUST**
  for the testcase uses where we know the port string is ok.
- After all of that I then went back and added a check during container.create()
  to check the port string so we'll report the error as soon as we get the
  data.
- If, somehow, the bad string does get into the metadata we will generate
  an error during container.start() but I can't test for that because
  the container.create() catches it now.  But I did add a testcase for that.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 12b6083c8f82db7e5db4c683cfe20151731ea851
Component: engine
2015-07-17 13:02:54 -07:00
8a425b30fb Merge pull request #14693 from LK4D4/update_libcontainer
Update libcontainer
Upstream-commit: 98ed9a55f42f7c86c7c9cddb27f6807e7e77c889
Component: engine
2015-07-17 13:02:04 -07:00
4daf251bed Merge pull request #13951 from calavera/plugins_path
Separate plugin sockets and specs.
Upstream-commit: a763637eae7dcf5d870e9d035be5baf94d72e2c5
Component: engine
2015-07-17 21:11:31 +02:00
4b2f3f5f76 Merge pull request #14605 from brahmaroutu/gccgo_scheduler
Go Scheduler issue with sync.Mutex
Upstream-commit: 7b83b0e15c4507871ed411aca5610aa7da751bd9
Component: engine
2015-07-17 08:16:32 -07:00
d905b9673f Go Scheduler issue with sync.Mutex using gccgo
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 9ca913d0f168d943f6e15f32f52f777732b354a7
Component: engine
2015-07-17 01:33:58 +00:00
d9e652a366 Update libcontainer
Replaced github.com/docker/libcontainer with
github.com/opencontainers/runc/libcontaier.
Also I moved AppArmor profile generation to docker.

Main idea of this update is to fix mounting cgroups inside containers.
After updating docker on CI we can even remove dind.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: c86189d554ba14aa04b6314970d3699e5ddbf4de
Component: engine
2015-07-16 16:02:26 -07:00
12460b884d Separate plugin sockets and specs.
Check if there is a plugin socket first under `/run/docker/plugins/NAME.sock`.
If there is no socket for a plugin, check `/etc/docker/plugins/NAME.spec` and
`/usr/lib/docker/plugins/NAME.spec` for spec files.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 6c0795747b00589641eb34eb7adce05a56d8840f
Component: engine
2015-07-16 14:20:07 -07:00