Commit Graph

53 Commits

Author SHA1 Message Date
d6d379e87a Add ability to refer to image by name + digest
Add ability to refer to an image by repository name and digest using the
format repository@digest. Works for pull, push, run, build, and rmi.

Signed-off-by: Andy Goldstein <agoldste@redhat.com>
Upstream-commit: a2b0c9778feac970524b98ef7a91b5528fdeb9d5
Component: engine
2015-03-17 10:10:42 +00:00
a5f51dc24e Fix env.WriteTo count return
Some calls like json.Encoder.Encode mask the number of bytes written to
an io.Writer. The solution provides a wrapper io.Writer around the
actual io.Writer that allows multiple calls to Write to be considered as
one and allow access to this count.

Signed-off-by: Pierre Wacrenier <pierre.wacrenier@gmail.com>
Upstream-commit: 0cd30cf3991de1b491cac3c0cecdc976f0098f29
Component: engine
2015-01-21 01:14:23 +01:00
e0fcb513b1 Move git and url checks into pkg
This moves the IsGIT and IsURL functions out of the generic `utils`
package and into their own `urlutil` pkg.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: feca1b1780a0942aafc1796d1fd52026a673bf92
Component: engine
2014-11-24 18:10:37 -05:00
85fb88371f Allow git@ prefixes for any hosted git service
Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
Upstream-commit: c7e4cc4a531b5337d64bda22df8553e646a96fe7
Component: engine
2014-11-24 20:49:54 +00:00
fdfe0c97e7 Add HasValidGITPrefix to utils/utils.go
This will allow us to use a common Git prefix check for both api/clients/commands.go and
builder/job.go. Previous prefix check in build from Git (in builder/jobs.go) ignored valid prefixes such as "git@", "http://" or "https://".

Signed-off-by: Lakshan Perera <lakshan@laktek.com>
Upstream-commit: d3ac9ea98e872fee808693c736bc5a465d6426e2
Component: engine
2014-10-26 03:25:25 +00:00
7c11f5dee8 Replace utils.CheckLocalDns with bytes.Contains line
Since RemoveLocalDns patch will  remove all localhost entries
from resolv.conf we no longer need anything more then
!bytes.Contains(resolvConf, []byte("nameserver")

To check for no nameserver entry in dns config.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: a297d6ab8c08a13503fd004ec1ad7ee9e23bd22a
Component: engine
2014-09-29 06:37:31 -04:00
e9ab736d16 move some io related utils to pkg/ioutils
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: 76212635b594d4472dd8d5b2e071fac416addbe7
Component: engine
2014-09-03 11:36:21 +03:00
e25f77248d Move parsing functions to pkg/parsers and the specific kernel handling
functions to pkg/parsers/kernel, and parsing filters to
pkg/parsers/filter. Adjust imports and package references.

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 4398108433121ce2ac9942e607da20fa1680871a
Component: engine
2014-07-29 13:09:10 -07:00
6ae4c9014c update go import path and libcontainer
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: b3ee9ac74e171e00f14027e39278013629e681b8
Component: engine
2014-07-24 22:19:50 +00:00
4d29e9b718 Move WriteBroadcaster to separate package as BroadcastWriter
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Upstream-commit: 9d4e80222144c0aef3e78202ecb4904b3ce5ed9b
Component: engine
2014-07-02 23:31:06 +04:00
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
ddc2df6d84 IANA allocated Docker port: 2375
2375/2376 are assigned:
http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=docker

For #1440

Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: 5febba93babcf8c4b01862e88b6f6e11a1532bc8
Component: engine
2014-06-04 06:54:19 +10: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
936bcbbb79 Add benchmark tests for TruncIndex.
Compare add vs new.

Some historical data in PR #5172.

Docker-DCO-1.1-Signed-off-by: Paul Nasrat <pnasrat@gmail.com> (github: pnasrat)
Upstream-commit: 84a76f27962d4f4b3871abe925ca17024bdeea73
Component: engine
2014-04-13 22:36:15 -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
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
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
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
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
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
875dd77195 Re-add kernel Flavor tests
Docker-DCO-1.1-Signed-off-by: Charles Lindsay <chaz@chazomatic.us> (github: chazomaticus)
Upstream-commit: cce099aa34e9588abc778b5f106bf862d4a838b0
Component: engine
2014-01-21 09:56:53 -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
7e4afd3263 Add failing test for odd kernel version
Docker-DCO-1.1-Signed-off-by: Charles Lindsay <chaz@chazomatic.us> (github: chazomaticus)
Upstream-commit: fc30346086a890687d145c33aa8fb3d0ad6a4b7e
Component: engine
2014-01-20 19:49:39 -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
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
d49fddb652 Improve TestParseHost
Upstream-commit: 69a31c33864abeaacbe9a07e50dd0cd8d406b15e
Component: engine
2013-12-16 16:35:56 -08:00
706b718f39 Allow to use -H unix:// like -H tcp://
Upstream-commit: 20605eb310f0b57bd06eea80ec63c5022fc83bde
Component: engine
2013-12-16 16:30:23 -08:00
cea9cd6554 gofmt
Upstream-commit: b00d5f018541bf141dc4732ad6d71d23b8c28b43
Component: engine
2013-11-13 19:25:55 +00:00
5ec9c64577 modify test of GetNameserversAsCIDR for its regex change.
Upstream-commit: 879aa29cb09c641bbd510eed03647f8f85f0d559
Component: engine
2013-11-12 18:18:30 +08:00
fac387b017 Merge branch 'master' of https://github.com/aanand/docker into aanand-master
Upstream-commit: da24945070e305e09d4d96d1f981614eaa18b01f
Component: engine
2013-11-11 12:34:16 -08:00
6d24142423 go fmt
Upstream-commit: 6998c3c387518ba8e06ceff00b10be583c95d6cd
Component: engine
2013-11-07 12:27:33 -08:00
a507d209c4 Prevent DNS server conflicts in CreateBridgeIface
Retrieve /etc/resolv.conf data (if available)

Add checkNameserverOverlaps and call it to
make sure there are no conflicts

Add utils.GetNameserversAsCIDR and tests

Read /etc/resolv.conf and pull out nameservers,
formatting them as a CIDR block ("1.2.3.4/32")
Upstream-commit: 3560c922b193e0f6b06c715a7b920f90a5990859
Component: engine
2013-11-05 21:24:37 -06:00
a1a49c8919 Container memory limit can be specified in kilobytes, megabytes or gigabytes
-m 10  # 10 bytes
    -m 10b # 10 bytes
    -m 10k # 10240 bytes (10 * 1024)
    -m 10m # 10485760 bytes (10 * 1024 * 1024)
    -m 10g # 10737418240 bytes (10 * 1024 * 1024 * 1024)

Units are case-insensitive, and 'kb', 'mb' and 'gb' are equivalent to 'k', 'm' and 'g'.
Upstream-commit: 9ee9d2f9959390d1cda56accbbd975df18d157ad
Component: engine
2013-11-01 12:00:17 +00:00
952ac8a789 Add links for container relationships and introspection
Upstream-commit: 1cbdaebaa1c2326e57945333420d25d6f77011d5
Component: engine
2013-10-25 15:13:24 -07:00
3f6f7d77a8 let utils.ParseHost return err when errors happen
Upstream-commit: e81da876df57fb8e0562cc64e7b57dc7eb32284a
Component: engine
2013-10-24 13:23:02 +08:00
cebebc8343 gofmt
Upstream-commit: 6678a26d1c94e7838c055a3da3b91ae3de8c3e3c
Component: engine
2013-09-09 15:11:30 -07:00
32d6ba57cb Compute dependency graph and upload layers in the right order when pushing
Upstream-commit: b3a70d767d913ec476bc1af53983c91a10d17f84
Component: engine
2013-09-04 02:21:40 +02:00
8468ddcf8f Merge pull request #1613 from thijsterlouw/proper_resolvconf_parsing
Proper resolv.conf parsing
Upstream-commit: 84431ec03c08f0d8ce8f9385aa1b709a28fef1f3
Component: engine
2013-08-30 12:10:45 -07:00
b48c0523d0 Refactored code and added unit tests
- Extracted ParseRelease method from GetKernelVersion to make code
  more testable
- Added tests for ParseRelease method
Upstream-commit: f4432d50c388c242bba6b697f31b32f1fe21ff65
Component: engine
2013-08-24 00:24:40 -07:00
f2e7496ac3 proper resolv.conf parsing
Upstream-commit: 62e84785b6ffec04a39cf611d7eaff21f2532195
Component: engine
2013-08-21 15:23:12 +02:00
efc4a51c0c Fixed typos
Upstream-commit: 9b2a5964fc2067014f24e26bd2f99873751ebdc3
Component: engine
2013-08-12 18:53:06 +01:00
74373c4d59 Update utils_test.go
Upstream-commit: dcf9dfb12961fc8101624af0b925d026fde4cde1
Component: engine
2013-08-05 16:32:25 -07:00
71b5dff299 Consider empty /etc/resolv.conf as local dns + add unit test
Upstream-commit: 3e9575e275c40acb04c505fa14c1ac63ba490b75
Component: engine
2013-08-02 15:23:36 -07:00
77e59c2148 add ParseRepositoryTag tests
Upstream-commit: 3852d0599097581d5dc0bcfcb7aa010d564beb9a
Component: engine
2013-07-29 12:16:01 +00:00
f380201be8 fix error in utils tests
Upstream-commit: 2e3b660dd0d49dc78f4c486e952ea6db9c007d6a
Component: engine
2013-07-19 13:56:36 +00:00
ef03a6ab8c Hotfix: make sure ./utils tests pass
Upstream-commit: 1004d57b85fc3714b089da4c457228690f254504
Component: engine
2013-07-15 17:58:23 -07:00
ab69a9cf4c fix regrettion in utils tests introduced by #980
Upstream-commit: eca9f9c1a1e436167eb660ad700f3f9f5189bae4
Component: engine
2013-06-24 16:12:39 +00:00
8ec498cc12 add tests
Upstream-commit: 9632bf228744dddfae2c303a0f2e8b962b6e0673
Component: engine
2013-06-19 12:40:01 +00:00