1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

54 commits

Author SHA1 Message Date
Antonio Murdaca
c30a55f14d Refactor utils/utils, fixes
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-14 01:37:36 +02:00
Andy Goldstein
a2b0c9778f 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>
2015-03-17 10:10:42 +00:00
Pierre Wacrenier
0cd30cf399 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>
2015-01-21 01:14:23 +01:00
Michael Crosby
feca1b1780 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>
2014-11-24 18:10:37 -05:00
Aidan Hobson Sayers
c7e4cc4a53 Allow git@ prefixes for any hosted git service
Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
2014-11-24 20:49:54 +00:00
Lakshan Perera
d3ac9ea98e 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>
2014-10-26 03:25:25 +00:00
Dan Walsh
a297d6ab8c 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)
2014-09-29 06:37:31 -04:00
unclejack
76212635b5 move some io related utils to pkg/ioutils
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-09-03 11:36:21 +03:00
Erik Hollensbe
4398108433 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)
2014-07-29 13:09:10 -07:00
Victor Vieux
b3ee9ac74e update go import path and libcontainer
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-07-24 22:19:50 +00:00
LK4D4
9d4e802221 Move WriteBroadcaster to separate package as BroadcastWriter
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
2014-07-02 23:31:06 +04:00
LK4D4
ed032ddfd6 Move truncindex in separate package in pkg/
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
2014-06-24 21:19:15 +04:00
SvenDowideit
5febba93ba 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 

Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
2014-06-04 06:54:19 +10:00
Michael Crosby
d33b4655c4 Move duration and size to units pkg
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-05-12 17:05:07 -07:00
Victor Vieux
3744452ecf add resolvconf
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-05-05 22:55:32 +00:00
Paul Nasrat
84a76f2796 Add benchmark tests for TruncIndex.
Compare add vs new.

Some historical data in PR .

Docker-DCO-1.1-Signed-off-by: Paul Nasrat <pnasrat@gmail.com> (github: pnasrat)
2014-04-13 22:36:15 -04:00
Paul Nasrat
4f169c2db5 Enable construction of TruncIndex from id array.
Fixes 

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)
2014-04-11 16:39:58 -04:00
Daniel Norberg
fbfac21ed4 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)
2014-03-19 10:49:25 -04:00
unclejack
611acf7a7c 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)
2014-03-03 23:00:53 +02:00
Michael Crosby
b02b933c62 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)
2014-03-01 03:46:45 -08:00
Tianon Gravi
2ae8180de2 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)
2014-02-24 13:38:58 -07:00
unclejack
31dde3ea05 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)
2014-02-13 13:54:37 +02:00
Charles Lindsay
cce099aa34 Re-add kernel Flavor tests
Docker-DCO-1.1-Signed-off-by: Charles Lindsay <chaz@chazomatic.us> (github: chazomaticus)
2014-01-21 09:56:53 -08:00
Charles Lindsay
d2c9c1036b 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)
2014-01-20 19:49:39 -08:00
Charles Lindsay
fc30346086 Add failing test for odd kernel version
Docker-DCO-1.1-Signed-off-by: Charles Lindsay <chaz@chazomatic.us> (github: chazomaticus)
2014-01-20 19:49:39 -08:00
Danny Yates
6b48761ce9 Remove unneeded DependencyGraph
Docker-DCO-1.0-Signed-off-by: Danny Yates <danny@codeaholics.org> (github: codeaholics)
2014-01-08 10:14:14 +00:00
Tianon Gravi
8f3b8f3835 Run 'gofmt -s -w' 2014-01-06 22:14:35 -07:00
Brian Goff
8b82b0dfe7 Make blank -H option default to the same as no -H was sent 2013-12-29 14:36:46 -05:00
Guillaume J. Charmes
69a31c3386
Improve TestParseHost 2013-12-16 16:35:56 -08:00
Guillaume J. Charmes
20605eb310
Allow to use -H unix:// like -H tcp:// 2013-12-16 16:30:23 -08:00
Solomon Hykes
b00d5f0185 gofmt 2013-11-13 19:25:55 +00:00
Liang-Chi Hsieh
879aa29cb0 modify test of GetNameserversAsCIDR for its regex change. 2013-11-12 18:18:30 +08:00
Victor Vieux
da24945070 Merge branch 'master' of https://github.com/aanand/docker into aanand-master 2013-11-11 12:34:16 -08:00
Guillaume J. Charmes
6998c3c387
go fmt 2013-11-07 12:27:33 -08:00
Mark Allen
3560c922b1 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")
2013-11-05 21:24:37 -06:00
Aanand Prasad
9ee9d2f995 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'.
2013-11-01 12:00:17 +00:00
Michael Crosby
1cbdaebaa1 Add links for container relationships and introspection 2013-10-25 15:13:24 -07:00
Yang Bai
e81da876df let utils.ParseHost return err when errors happen 2013-10-24 13:23:02 +08:00
Jason McVetta
6678a26d1c gofmt 2013-09-09 15:11:30 -07:00
shin-
b3a70d767d Compute dependency graph and upload layers in the right order when pushing 2013-09-04 02:21:40 +02:00
Michael Crosby
84431ec03c Merge pull request from thijsterlouw/proper_resolvconf_parsing
Proper resolv.conf parsing
2013-08-30 12:10:45 -07:00
Mohit Soni
f4432d50c3 Refactored code and added unit tests
- Extracted ParseRelease method from GetKernelVersion to make code
  more testable
- Added tests for ParseRelease method
2013-08-24 00:24:40 -07:00
Thijs Terlouw
62e84785b6 proper resolv.conf parsing 2013-08-21 15:23:12 +02:00
Pascal Borreli
9b2a5964fc Fixed typos 2013-08-12 18:53:06 +01:00
Guillaume J. Charmes
dcf9dfb129 Update utils_test.go 2013-08-05 16:32:25 -07:00
Guillaume J. Charmes
3e9575e275
Consider empty /etc/resolv.conf as local dns + add unit test 2013-08-02 15:23:36 -07:00
Victor Vieux
3852d05990 add ParseRepositoryTag tests 2013-07-29 12:16:01 +00:00
Victor Vieux
2e3b660dd0 fix error in utils tests 2013-07-19 13:56:36 +00:00
Guillaume J. Charmes
1004d57b85
Hotfix: make sure ./utils tests pass 2013-07-15 17:58:23 -07:00
Victor Vieux
eca9f9c1a1 fix regrettion in utils tests introduced by 2013-06-24 16:12:39 +00:00