Commit Graph

181 Commits

Author SHA1 Message Date
1ce22444ec Move truncindex in separate package in pkg/
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Upstream-commit: ed032ddfd68a8654671a13d676c0f7539e36a10b
Component: engine
2014-06-24 21:19:15 +04:00
dc559e048a improve numeric only id detection
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: f2baa364a13ea3e22719e3637bf6f5f42e5dc677
Component: engine
2014-05-27 21:03:12 +00:00
f45c8a5e25 Merge pull request #5782 from unclejack/fix_5270
Upstream-commit: 8eef1be29e763db58a22d336b71d97c076a11199
Component: engine
2014-05-19 10:36:10 -07:00
95b5064ed6 client: Rip out HTTP check from docker version
For background to this change please see:
https://github.com/dotcloud/docker/issues/4802
https://github.com/dotcloud/docker/pull/5670

Docker-DCO-1.1-Signed-off-by: Jonathan McCrohan <jmccrohan@gmail.com> (github: jmccrohan)
Upstream-commit: 3cec63d56f9de6332aa3f33502695283d4feb054
Component: engine
2014-05-18 02:22:22 +01:00
e59443d033 add ValidateContextDirectory to utils/utils.go
This commit adds a function which can be used to ensure all contents of
a directory can be accessed.

This function doesn't follow symlinks to check if they're pointing to
files which exist. Such symlinks can be useful later.

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: 1dedcd0d376f57abae5cadd38116c1aca2821330
Component: engine
2014-05-17 02:38:28 +03:00
94d0641f06 Merge pull request #5756 from crosbymichael/move-units-to-pkg
Move duration and size to units pkg
Upstream-commit: bc22c9948c5380715338aef63fcc6cccd1a16bd7
Component: engine
2014-05-14 11:36:14 -07:00
bc13a475f8 add UpdateSuffixarray and refactor TruncIndex
This commit refactors TruncIndex to make it possible to add container
ids to the TruncIndex without updating the Suffixarray.

This is useful during the Docker daemon's startup when we don't want to
update the Suffixarray for every container we add.

Add continues to function like before.

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: 219b7ae8b526bb5e6d0e27176308db71438a002f
Component: engine
2014-05-14 17:57:59 +03:00
7c5b416146 Move Follow symlink to pkg
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: dcf81f95fdfe3ac8e97602d2ef2fef03288c15b1
Component: engine
2014-05-13 10:35:57 -07:00
d39f282a2b Move duration and size to units pkg
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: d33b4655c4339dcbbf9f78948598e216ac3c06b4
Component: engine
2014-05-12 17:05:07 -07:00
ac35d8965e add resolvconf
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: 3744452ecf46351758478e99795e20b186a1bee4
Component: engine
2014-05-05 22:55:32 +00:00
6a260a1e42 Timestamps for docker logs.
Fixes #1165
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Upstream-commit: d1297feef8b124e69efc99a58294f498ecb8c022
Component: engine
2014-05-01 20:40:36 +04:00
74f0d78beb Enable construction of TruncIndex from id array.
Fixes #5166

Current graph.restore is essentially O(n^2 log n) due to how
suffixarray creation works.

Rather than create/append/create new this supports creation from a seed
array of ids.

Functional testing shows this eliminates the hang on Creating image
graph reported on list.

Docker-DCO-1.1-Signed-off-by: Paul Nasrat <pnasrat@gmail.com> (github: pnasrat)
Upstream-commit: 4f169c2db512d2ea9ed5729df375896a1ee90347
Component: engine
2014-04-11 16:39:58 -04:00
9e1caa6b4a Add --opt arguments for drivers
In order to handle special configuration for different drivers we
make the Config field a map to string array. This lets
us use it for lxc, by using the "lxc" key for those, and we can
later extend it easily for other backend-specific options.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: 7a3070a6000963d12be9dcd2698d911b848a33b6
Component: engine
2014-03-27 21:47:47 +01:00
c037f13ab8 configurable dns search domains
Add a --dns-search parameter and a DnsSearch
configuration field for specifying dns search
domains.

Docker-DCO-1.1-Signed-off-by: Daniel Norberg <daniel.norberg@gmail.com> (github: danielnorberg)
Upstream-commit: fbfac21ed4de550ce72d993810dc07a2c4877a88
Component: engine
2014-03-19 10:49:25 -04:00
2f081de14e move git clone from daemon to client
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)

add a little doc
Upstream-commit: 8301fc8e56503d5a0ea2316a0778faf4cf5f5f1e
Component: engine
2014-03-11 01:23:14 +00:00
fc0f37e6e1 Move image into sub pkg
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 82a5439835b0bff3ab3dfb169415948dae504d56
Component: engine
2014-03-09 22:59:29 -07:00
04d68b69ad handle symlinks for Docker's root dir & TMPDIR
This removes the incomplete symlink handling from engine.go and it adds
it one place in docker.go.

It also enables handling symlinks for TMPDIR.

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: 611acf7a7c1c3a6796e862fb94143890a9aa4573
Component: engine
2014-03-03 23:00:53 +02:00
8b72c046df Merge pull request #4412 from crosbymichael/fix-env-clobber
Don't always just append env vars, replace defaults with ones from confi...
Upstream-commit: aac9542a68ee59c62c2cf15df69f77640113bb95
Component: engine
2014-03-03 22:52:03 +02:00
e8666de768 Don't always just append env vars, replace defaults with ones from config
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: b02b933c6292c539833c15c15299628ac3360572
Component: engine
2014-03-01 03:46:45 -08:00
48d86198db Make the chan for utils.Go buffered in order to avoid goroutine leak
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
Upstream-commit: d3a6ee1e55a53ee54b91ffb6c53ba674768cf9de
Component: engine
2014-02-28 16:35:43 -08:00
e085e22f6b Adjust kernel version parsing to be more lenient of strange things like "3.12-1-amd64"
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: 2ae8180de2d814e04834d41f20b2c96a06995678
Component: engine
2014-02-24 13:38:58 -07:00
690b93143a Move proxy into pkg
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 8c39db8f96ac2a7ec479a679bc060410cee1a567
Component: engine
2014-02-14 15:48:05 -08:00
171ba8d692 disallow tcp:// from defaulting to 127.0.0.1:4243
This stops docker from accepting tcp:// as a valid bind address.

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: 31dde3ea05e1cf4c1f45083c1b6129e8c2a362df
Component: engine
2014-02-13 13:54:37 +02:00
9ed97b673b Move even more stuff into dockerversion
Also, use it in all the places. :)

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: da04f49b383c02ee28c32f948048b9e9a402bb4f
Component: engine
2014-02-11 17:26:54 -07:00
1ed42315f3 Move UserLookup functionality into a separate pkg/user submodule that implements proper parsing of /etc/passwd and /etc/group, and use that to add support for "docker run -u user:group" and for getting supplementary groups (if ":group" is not specified)
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: ee93f6185be3ae73c16cf41ae397bae3ce2f6c55
Component: engine
2014-01-31 20:15:24 -07:00
93246312a1 server: add socket activation
This adds the ability to socket activate docker by passing in
`-H fd://*` along with examples systemd configuration files.

The fastest way to test this is to run:

```
/usr/lib/systemd/systemd-activate -l 127.0.0.1:2001 /usr/bin/docker -d -H 'fd://*'
docker -H tcp://127.0.0.1:2001 ps
```

Docker-DCO-1.1-Signed-off-by: Brandon Philips <brandon.philips@coreos.com> (github: philips)
Upstream-commit: 87fb2c973d8f9a8a1868ab0c2da504095d04715b
Component: engine
2014-01-27 17:17:07 -08:00
c462b24e66 Add comment about ignoring Sscanf error
Docker-DCO-1.1-Signed-off-by: Charles Lindsay <chaz@chazomatic.us> (github: chazomaticus)
Upstream-commit: dea3c2655dc02c03cf7dc03d058068cf9f0d0970
Component: engine
2014-01-22 09:32:50 -08:00
17cbc16b08 Re-add Flavor to KernelVersionInfo
Docker-DCO-1.1-Signed-off-by: Charles Lindsay <chaz@chazomatic.us> (github: chazomaticus)
Upstream-commit: b78ae3b652d609a895cf36886e053124d2f8ae80
Component: engine
2014-01-20 21:26:23 -08:00
e8c0aaecc5 Use Sscanf instead of regexp
Docker-DCO-1.1-Signed-off-by: Charles Lindsay <chaz@chazomatic.us> (github: chazomaticus)
Upstream-commit: 5b97e00438b094db608f350732f7e4d426c50999
Component: engine
2014-01-20 21:02:37 -08:00
3fbfa38dfc Fix apparent typo
Docker-DCO-1.1-Signed-off-by: Charles Lindsay <chaz@chazomatic.us> (github: chazomaticus)
Upstream-commit: 14b2b2b7c2db83ef1413a7469608f655cd15958e
Component: engine
2014-01-20 19:49:40 -08:00
185397ce27 Remove Flavor from KernelVersionInfo
Also change to parsing it with regexp to keep things simple.

Docker-DCO-1.1-Signed-off-by: Charles Lindsay <chaz@chazomatic.us> (github: chazomaticus)
Upstream-commit: d2c9c1036b94b0c3e7fa3f591fa83f9c95f49406
Component: engine
2014-01-20 19:49:39 -08:00
c2c845ecd8 Merge branch 'fix-registry-push-tags' of https://github.com/codeaholics/docker into codeaholics-fix-registry-push-tags
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 03a25c0800691806534d96f108856097e9c18d6b
Component: engine
2014-01-20 11:23:09 -08:00
38c89dc581 Stream the cp operation on the client
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: fdd8d4b7d9dbc32a76a708d0d51c201cf9c977f0
Component: engine
2014-01-17 10:51:29 -08:00
82c7a6024b Add RWMutex lock into TruncIndex to fix race condition when inserting values
The idx.index array is overwritten when a new value is inserted to the index.
When two containers are created concurrently, their ids are inserted to the
index and one can overwrite the other leaving one of ids missing from the
index. Adding a RWMutex lock around read/write operations fixes this.

Docker-DCO-1.1-Signed-off-by: James Allen <jamesallen0108@gmail.com> (github: jpallen)
Upstream-commit: 37fcbfa1f4586e4437664239fc271dda31ac1837
Component: engine
2014-01-15 17:30:00 +00:00
be95f4675e Use https to get the latest docker version
To avoid unexpected results since docker was using http.
For instance, my broadband doesn't return not found when it's down but
a html page saying that the internet is down. Docker was showing that
html instead of ignoring it.

Fix #3570

Docker-DCO-1.1-Signed-off-by: Fabio Falci <fabiofalci@gmail.com> (github: fabiofalci)
Upstream-commit: 89bed4337d2314c3ffaac231c141b635ecc65ac5
Component: engine
2014-01-13 20:37:29 +00:00
806b082861 Cleanup utils.Download
Docker-DCO-1.0-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
Upstream-commit: 762a0cc4723917b4e6ca3731356e43c5e9a13f5f
Component: engine
2014-01-08 14:22:49 -08:00
38f9c632bb Remove unneeded DependencyGraph
Docker-DCO-1.0-Signed-off-by: Danny Yates <danny@codeaholics.org> (github: codeaholics)
Upstream-commit: 6b48761ce92e5f9590fd8b2723176ab72d297e6c
Component: engine
2014-01-08 10:14:14 +00:00
af7e2d6bbd Run 'gofmt -s -w'
Upstream-commit: 8f3b8f383519452001cc05bf6505e9c301ebe954
Component: engine
2014-01-06 22:14:35 -07:00
54d230777d Merge pull request #3377 from cpuguy83/3333-fix_-H_default
Make blank -H option default to the same as no -H was sent
Upstream-commit: 4e414f62052fd0389d79122db5b0071ddab5d027
Component: engine
2014-01-06 11:30:27 -08:00
0ccbdf155d Extract cgroups utilities to own submodule.
Use mountinfo rather than for cgroups parsing.
Make helper method private and change name.
Makes method naming more explicit rather than GetThisCgroup.
Use upstream term subsystem rather than cgroupType.
Upstream-commit: c561212b837735213f146c2fac291f84dbcbc8c3
Component: engine
2014-01-02 17:54:57 -05:00
cc877515e3 Make blank -H option default to the same as no -H was sent
Upstream-commit: 8b82b0dfe74684b5ea30b7487475f7ca4abcc58e
Component: engine
2013-12-29 14:36:46 -05:00
cf1704f27a Merge pull request #3064 from tianon/custom-dockerinit-path
Allow custom dockerinit path
Upstream-commit: 636dfc82b0c9aaddd5b0f5fb0f70797d5068c93e
Component: engine
2013-12-19 14:31:41 -08:00
7df1c5a0f0 Merge pull request #3234 from creack/default_unix_path
Default unix path
Upstream-commit: 1acefac97eafdb8e701763da8616b607be4f0510
Component: engine
2013-12-17 16:24:01 -08:00
a7db351ec0 Allow packagers to specify a custom dockerinit lookup location via DOCKER_INITPATH in dynbinary
Only necessary if distro policy dictates that the path deviate from the paths already listed in utils/utils.go - please refrain from using it otherwise.
Upstream-commit: 2ed1001c57646f6869016739a8e177bb52f32e2a
Component: engine
2013-12-16 22:29:08 -07:00
af74b97c6a Always copy dockerinit locally, regardless of whether our docker binary is static, because even it might get deleted or moved/renamed
Upstream-commit: 2035af44aae3664b217d6903cbf39c259f568490
Component: engine
2013-12-16 22:29:00 -07:00
706b718f39 Allow to use -H unix:// like -H tcp://
Upstream-commit: 20605eb310f0b57bd06eea80ec63c5022fc83bde
Component: engine
2013-12-16 16:30:23 -08:00
d5accda95c Reimplement lxc-ps
Instead of calling lxc-ps in top endpoint, we reimplement it by
calling ps and filter for pids running in a given container.
Upstream-commit: 4faba4fae78ab216f2cfd90b1ef23706d933b731
Component: engine
2013-12-16 13:30:35 +01:00
8eac8d89db remove unused parameter in Download
Upstream-commit: 12180948be8040a4cdf99a0e660098cd33e32832
Component: engine
2013-12-04 11:54:11 -08:00
4ad49ae63e Merge pull request #2924 from tianon/strict-fhs-compatibility
Add proper dockerinit path support for distros that use FHS 2.3
Upstream-commit: 8cc524996a0d29a5b11a14ef17950193d45c1e05
Component: engine
2013-12-02 11:35:36 -08:00
26b3fb6752 Merge pull request #2829 from dotcloud/refactor_opts
Refactor opts
Upstream-commit: fe571dd29328efe5f5318c0b146d0aa5a66217a2
Component: engine
2013-12-02 10:41:30 -08:00