Commit Graph

1056 Commits

Author SHA1 Message Date
efe044b445 Windows - make docker cp functional
Signed-off-by: John Howard <jhoward@microsoft.com>

Conflicts:
	pkg/archive/copy.go

Make it compile

Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 2a237615c0915b60b8dc6c13a377bb766780ecbf
Component: engine
2015-08-06 11:22:38 -07:00
23d0cda657 Remove pkg/systemd
Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: 931645c46056ae24b2df51c447b6df1a66b2ca30
Component: engine
2015-08-06 14:35:00 +02:00
3ec8bc1fa3 Cleanup: Merge adjustCPUShares to adoptContainerSettings
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: e0af23dc18eac17633ab1f2541f26b56c303a18c
Component: engine
2015-08-06 08:15:14 +08:00
82b6f1602c Fail fail when the ps format template is invalid.
Fixes error continuing execution when the parsing fails.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 3d3db0d4af6cf483299a152133f19f9df760dc11
Component: engine
2015-08-05 13:22:24 -07:00
aa73b79fe2 Merge pull request #14921 from aaronlehmann/int64
Fix uses of "int" where "int64" should be used instead
Upstream-commit: 7374852be9def787921aea2ca831771982badecf
Component: engine
2015-08-04 19:16:13 -07:00
4b1fbc6af4 Add more unit tests (thus coverage) to pkg api
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: f7e43d45b396d6c1f7d8f3f0606917501f466015
Component: engine
2015-08-04 19:51:02 +02:00
a4a7851f11 Merge pull request #13698 from cpuguy83/split_api_routes_from_setup
Move api handlers to separate file
Upstream-commit: 102724700bf816a826da30d4eb35b51486413ccc
Component: engine
2015-08-03 14:03:15 -04:00
0cd1b722f7 Split API handlers into domain specific files
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 1a77580030439cef25e8f987b03733f173662746
Component: engine
2015-08-03 11:12:44 -04:00
dd73699a9b Updated to use latest version of notary
Update UX to use aliases for root, snapshot, and target key

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 6ce76cd9ed0e014e109ec632fa21b7e853f56951
Component: engine
2015-07-31 17:32:35 -07:00
761b152e62 Fix uses of "int" where "int64" should be used instead
Some structures use int for sizes and UNIX timestamps. On some
platforms, int is 32 bits, so this can lead to the year 2038 issues and
overflows when dealing with large containers or layers.

Consistently use int64 to store sizes and UNIX timestamps in
api/types/types.go. Update related to code accordingly (i.e.
strconv.FormatInt instead of strconv.Itoa).

Use int64 in progressreader package to avoid integer overflow when
dealing with large quantities. Update related code accordingly.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 1f61084d83aea37b212468aaa975020094b7f7c9
Component: engine
2015-07-31 16:31:40 -07:00
03122f024f Merge pull request #15144 from aaronlehmann/graph-cleanup
Documentation improvements and code cleanups for graph package
Upstream-commit: 8f2dca538619372663a94bc5141dbc7f121defb8
Component: engine
2015-07-31 15:11:34 -07:00
712ef17493 Docker stats: display Block IO stats
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 6a4ac63aaac829e94c7d6cbb31a8d36b93757620
Component: engine
2015-07-31 21:26:32 +08:00
61c2d57722 Use default no-op uuid.Loggerf for client cli
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 3face3c521127cb86570c68d5f2a8f55e7633146
Component: engine
2015-07-30 21:19:51 -04:00
c5a5900eb9 Documentation improvements and code cleanups for graph package
Expand the godoc documentation for the graph package.

Centralize DefaultTag in the graphs/tag package instead of defining it
twice.

Remove some unnecessary "config" structs that are only used to pass
a few parameters to a function.

Simplify the GetParentsSize function - there's no reason for it to take
an accumulator argument.

Unexport some functions that aren't needed outside the package.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: d4836cd7ec1c085c5a5caa7eb7f5eda4ace10eb6
Component: engine
2015-07-30 14:27:10 -07:00
0c28668f97 Merge pull request #14950 from ottok/master
Multiple fixes to 'docker stats' output
Upstream-commit: 85051832522ca217401d6eb4ddda1b1a7fdce9ad
Component: engine
2015-07-30 14:02:35 -07:00
a55bf4a409 Merge pull request #14885 from jlhawn/fix_cp_symlink
Fix copying of symlinks in containers
Upstream-commit: 030f61df3db2c053d68aacddc2c6893db3dee6ce
Component: engine
2015-07-30 13:42:40 -07:00
c7e78a7a31 Merge pull request #14844 from WeiZhang555/golint-api
fix golint errors/warnings of pkg api/
Upstream-commit: 2f1a7c903f163b3d85c96683971aaad4a24585d7
Component: engine
2015-07-30 16:02:06 -04:00
0a7e55f30a Fix docker cp Behavior With Symlinks
[pkg/archive] Update archive/copy path handling

  - Remove unused TarOptions.Name field.
  - Add new TarOptions.RebaseNames field.
  - Update some of the logic around path dir/base splitting.
  - Update some of the logic behind archive entry name rebasing.

[api/types] Add LinkTarget field to PathStat

[daemon] Fix stat, archive, extract of symlinks

  These operations *should* resolve symlinks that are in the path but if the
  resource itself is a symlink then it *should not* be resolved. This patch
  puts this logic into a common function `resolvePath` which resolves symlinks
  of the path's dir in scope of the container rootfs but does not resolve the
  final element of the path. Now archive, extract, and stat operations will
  return symlinks if the path is indeed a symlink.

[api/client] Update cp path hanling

[docs/reference/api] Update description of stat

  Add the linkTarget field to the header of the archive endpoint.
  Remove path field.

[integration-cli] Fix/Add cp symlink test cases

  Copying a symlink should do just that: copy the symlink NOT
  copy the target of the symlink. Also, the resulting file from
  the copy should have the name of the symlink NOT the name of
  the target file.

  Copying to a symlink should copy to the symlink target and not
  modify the symlink itself.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 75f6929b449a59335572436862d644afacf55cdb
Component: engine
2015-07-30 12:14:28 -07:00
eaafbe08a2 Multiple fixes to 'docker stats' output:
* Add space between values in docker stats output for easier parsing

  Old output could not be parsed easily because there were columns
  that did not have any separator. Also values that are together
  without any space is difficult to read even for humans.

* Update unit.HumanSize comment to match what the does actually does

Signed-off-by: Otto Kekäläinen <otto@seravo.fi>
Upstream-commit: b619220ce11770ffaea068b54d3975c74f7c24f9
Component: engine
2015-07-30 10:14:57 +03:00
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
cebd8dac4d fix golint errors/warnings of pkg api/
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: cfeab585c0e831ef073c689c065a52b84ae08761
Component: engine
2015-07-30 09:46:25 +08:00
683390e0bc Merge pull request #14980 from jlhawn/build_tag_resolved_digests
[api/client] Tag resolved digest from Dockerfile
Upstream-commit: d94aeb28765635970e7cac605b85785212855438
Component: engine
2015-07-29 16:52:14 -07:00
1bd0671e56 Merge pull request #15098 from calavera/backwards_compat_kill_error
Keep backwards compatibility in kill api.
Upstream-commit: 4a71323ec3c00be48e3539a1da0444972f22c355
Component: engine
2015-07-29 16:42:36 -07:00
18ba2e91f3 Merge pull request #15139 from tiborvass/fix-uuid-loggerf
Set uuid.Loggerf to nop on client and to logrus.Warnf on daemon
Upstream-commit: 28ac78c02f502858a243982fa84995bb389427a3
Component: engine
2015-07-29 18:17:54 -04: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
74a4e76af0 Set uuid.Loggerf to nop on client and to logrus.Warnf on daemon
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 7841d6ab9a58aff1d607eea7303c665c159ceaec
Component: engine
2015-07-29 17:49:59 -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
36ee6380c9 api/client fix golint errors/warnings
Addresses #14756

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 929f2c2f4074e66bb1e942a338e4d2a815096d45
Component: engine
2015-07-29 17:20:54 +00:00
4c4cfdbd2e Merge pull request #14785 from brahmaroutu/lint_api_server
fix golint errors/warnings
Upstream-commit: 2cd058ce4f022f98be22c780a703d93b51722d19
Component: engine
2015-07-29 13:09:31 -04:00
9d7f169c3f Merge pull request #15107 from LK4D4/unsafe_random
Use non-crypto version of random to generate ids.
Upstream-commit: 9d3ad6d892312b544950dc1c2d7aae224a4b9d06
Component: engine
2015-07-29 11:47:38 -04: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
20be6af896 Merge pull request #15060 from jlhawn/fix_build_renamed_dockerfile
[api/client] update check Dockerfile in Context
Upstream-commit: c19a00d4cbc52adc7da76f2f5f70bb38190c2271
Component: engine
2015-07-28 21:30:19 -04:00
e057b33e06 [api/client] Tag resolved digest from Dockerfile
Builds where the base images have been resolved to trusted digest
references will now be tagged with the original tag reference from
the Dockerfile on a successful build.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: bb2e6c72d2fb3f1b64755bdf6d6269dbc6767f87
Component: engine
2015-07-28 17:54:48 -07:00
dcda9483a8 api/server fix golint errors/warnings.
Addresses #14756
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 351f6b8ec011983d894951769c2116c9feaf81d2
Component: engine
2015-07-28 22:44:39 +00:00
26753acfcd Keep backwards compatibility in kill api.
Return an error when the container is stopped only in api versions
equal or greater than 1.20 (docker 1.8).

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 621e3d8587bbee86b4e36d0b7822662bfbedd76c
Component: engine
2015-07-28 12:25:36 -07:00
5acbf86531 Windows: Factoring out unused fields
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 47c56e4353792e16f994a35ea4063768bee6590e
Component: engine
2015-07-27 17:44:18 -07:00
5509021293 [api/client] update check Dockerfile in Context
Actually determine the relative path of the Dockerfile to the context
directory. Error out if the relative path starts with "../".

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: af06d289e4300f3b86ec9deba7280c3c37fa4e05
Component: engine
2015-07-27 16:11:36 -07: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
e075bafeec Merge pull request #15039 from jlhawn/fix_build_context_is_symlink
[api/client] Fix build when context dir is symlink
Upstream-commit: bdc55be9b49bd4cdcc9373e2eb847b133532cedc
Component: engine
2015-07-27 15:11:36 -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
a5d4f063b0 [api/client] Fix build when context dir is symlink
Symbolic links in the context directory path are now evaluated.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 01d570ad30a794f2736b679700af91625e61bc85
Component: engine
2015-07-27 12:01:13 -07:00
58f2d2b582 Merge pull request #14852 from rhatdan/relabel
Rename internal field Relabel to Mode
Upstream-commit: 2f5dc43ca204c5d6e48abf5f64a46e150f3d0bfd
Component: engine
2015-07-27 10:31:08 -07:00
9093f9669d Merge pull request #14981 from calavera/bump_api_version
Bump api version to 1.21.
Upstream-commit: 912bafcf3636ce1de242177a144c727e965b97be
Component: engine
2015-07-27 10:17:24 -07:00
ae24227f7b Merge pull request #15028 from vbatts/typo
api/client/build: typo in error
Upstream-commit: c451d597f2abef42bd26212d18844a03c3773818
Component: engine
2015-07-27 10:13:05 -07:00
704cf2735f Merge pull request #15010 from runcom/14947-fix-inspect-time-RFC3339Nano
Format times in inspect command with a template as RFC3339Nano
Upstream-commit: e89aec0dfb2dd4a5decc11ea008f3ab179e8d5f8
Component: engine
2015-07-27 10:08:21 -07:00
a4c7971630 Bump api version to 1.21.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 0eb88a0751365050cb177e16196622fd1d322efc
Component: engine
2015-07-27 09:48:47 -07:00
b62ae3048a api/client/build: typo in error
Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 0e697ebe6eddc02b0fd2f35bf7bb4557b068be18
Component: engine
2015-07-27 11:01:26 -04:00
dec1a0e3c4 Check for nil before using HostConfig to adjustCpuShares
Fix #14915. Add unit test for #14915.
Thanks @runcom for the test case: when the client calls 1.18 api
version w/o hostconfig it results in a nil pointer dereference.

Signed-off-by: Stephen Rust <srust@blockbridge.com>
Upstream-commit: c358a4cd3597ac330674c9d93b6038e8f455c8f7
Component: engine
2015-07-26 20:33:04 -04:00
0fccf757d0 Format times in inspect command with a template as RFC3339Nano
In 1.6.2 we were decoding inspect API response into interface{}.
time.Time fields were JSON encoded as RFC3339Nano in the response
and when decoded into interface{} they were just strings so the inspect
template treated them as just strings.
From 1.7 we are decoding into types.ContainerJSON and when the template
gets executed it now gets a time.Time and it's formatted as
2015-07-22 05:02:38.091530369 +0000 UTC.
This patch brings back the old behavior by typing time.Time fields
as string so they gets formatted as they were encoded in JSON -- RCF3339Nano

Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: c9207bc0aa57745876a3422d2cbc290be7c53da8
Component: engine
2015-07-26 15:25:08 +02:00