Commit graph

1119 commits

Author SHA1 Message Date
Allen Madsen
8257ab096a Fix (*Ulimit).String() function. Closes #11769.
Signed-off-by: Allen Madsen <blatyo@gmail.com>
2015-03-25 19:39:05 -04:00
Anes Hasicic
3550131b5e Removed redundant elses
Signed-off-by: Anes Hasicic <anes.hasicic@gmail.com>
2015-03-25 23:34:00 +01:00
Simon Eskildsen
c19536bd08 listenbuffer: add docs
Signed-off-by: Simon Eskildsen <sirup@sirupsen.com>
2015-03-25 03:11:34 +00:00
Simon Eskildsen
688b143a36 listenbuffer: add test
Signed-off-by: Simon Eskildsen <sirup@sirupsen.com>
2015-03-25 03:11:33 +00:00
Yestin Sun
219034eabe Add more tests for pkg/chrootarchive
Fixes issue #11601

Change-Id: Ifc1dbcc59cc4dc581ed43fc8fbe43fbaec4ccad0
Signed-off-by: Yestin Sun <sunyi0804@gmail.com>
2015-03-24 18:23:28 -07:00
Jimmy Puckett
4e4940d411 Changing bitflag checking style to preferred style. Fixes #11668
Signed-off-by: Jimmy Puckett <jimmy.puckett@spinen.com>
2015-03-24 21:09:25 -04:00
Rick Wieman
c0c4f68893 Moved pidfile from utils to pkg
Fixes #10958 by moving utils.daemon to pkg.pidfile.
Test cases were also added.
Updated the daemon to use the new pidfile.

Signed-off-by: Rick Wieman <git@rickw.nl>
2015-03-24 23:59:32 +01:00
Alexander Morozov
4341a8f231 Merge pull request #11712 from 4gh/test_httputils
add tests for pkg/httputils
2015-03-24 13:56:31 -07:00
Tibor Vass
b7d181d5a2 Merge pull request #11663 from arthurbarr/master
Fix #11589 by adding README and comments to exported functions
2015-03-24 14:45:05 -06:00
Arthur Barr
64bbaecb07 Fix #11589 by adding README and comments to exported functions
Signed-off-by: Arthur Barr <arthur.barr@uk.ibm.com>
2015-03-24 17:30:19 +00:00
Antonio Murdaca
4dd569ee0f Refactor pkg/common, Fixes #11599
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-24 18:19:59 +01:00
Hu Keping
6a6ba3da1d Fix minor typo
Fix minor typo and make the comments of version-comparison functions
uniform.

Signed-off-by: Hu Keping <hukeping@huawei.com>
2015-03-25 00:46:22 +08:00
Frank Herrmann
740c8c3fb5 add tests for pkg/httputils
closes #11597

Signed-off-by: Frank Herrmann <fgh@4gh.tv>
2015-03-24 16:27:09 +00:00
Michael Crosby
bf85bf6e19 Merge pull request #11634 from robertabbott/testutils_refactor
Refactors pkg/testutils
2015-03-23 17:30:51 -07:00
Jessie Frazelle
15436e591f Merge pull request #11636 from robertabbott/refactor_networkfs
Refactor pkg/networkfs
2015-03-23 16:58:29 -07:00
Jessie Frazelle
32cd20cfc3 Merge pull request #11422 from vbatts/vbatts-overlay_dir_mtime_changes
pkg/archive: ignore mtime changes on directories
2015-03-23 15:24:05 -07:00
Ahmet Alp Balkan
327e5ef601 Disable ANSI emulation in certain windows shells
This disables recently added ANSI emulation feature in certain Windows
shells (like ConEmu) where ANSI output is emulated by default with builtin
functionality in the shell.

MSYS (mingw) runs in cmd.exe window and it doesn't support emulation.

Cygwin doesn't even pass terminal handles to docker.exe as far as I can
tell, stdin/stdout/stderr handles are behaving like non-TTY. Therefore not
even including that in the check.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-03-23 18:38:43 +00:00
Jessie Frazelle
885a11991a Merge pull request #10347 from unclejack/bufreader_reset
reset bufReader to avoid extreme growth of buffers
2015-03-23 10:07:43 -07:00
Jessie Frazelle
7bddaac507 Merge pull request #11395 from mitchcapper/master
Change windows default permissions to 755 not 711, read access for all p...
2015-03-23 09:59:40 -07:00
bobby abbott
e00c1dc67f Refactor pkg/networkfs
Solves #11591

Signed-off-by: bobby abbott <ttobbaybbob@gmail.com>
2015-03-22 23:53:47 -07:00
bobby abbott
edb2afec9f Refactors pkg/testutils
Solves #11579.

Signed-off-by: bobby abbott <ttobbaybbob@gmail.com>
2015-03-22 22:31:46 -07:00
Arnaud Porterie
c9fdd26131 Merge pull request #11566 from tiborvass/carry-10864
Carry 10864: ANSI terminal emulation for windows
2015-03-22 18:21:32 -07:00
Tibor Vass
4cbedb8d54 winconsole: cleanup
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-03-22 15:47:54 -04:00
Mitch Capper
1a26dcf2cb Change windows default permissions to 755 not 711, read access for all poses little security risk and prevents breaking existing Dockerfiles
Signed-off-by: Mitch Capper <mitch.capper@gmail.com>
2015-03-20 21:54:33 -07:00
Sachin Joshi
9cc42dea7c Reduce memory allocation and remove channels
Signed-off-by: Sachin Joshi <sachin_jayant_joshi@hotmail.com>
2015-03-19 18:07:56 -07:00
Sachin Joshi
7fc3c0ba26 Fix panic with vi in busybox
Following bugs are fixed:
1.Handle out of bound cursor movements: vi in busybox sets cursor
to (999,999) expecting it to be set to right, bottom correctly.

2.Correctly determine redirected non-terminal file.

Signed-off-by: Sachin Joshi <sachin_jayant_joshi@hotmail.com>
2015-03-18 13:10:57 -07:00
unclejack
3b45ed0fee pkg/ioutils: avoid huge Buffer growth in bufreader
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
2015-03-18 19:51:55 +02:00
unclejack
0706016675 pkg/ioutils: add tests for BufReader
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
2015-03-18 19:32:46 +02:00
Vincent Batts
233218e437 pkg/archive: ignore mtime changes on directories
on overlay fs, the mtime of directories changes in a container where new
files are added in an upper layer (e.g. '/etc'). This flags the
directory as a change where there was none.

Closes #9874

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2015-03-17 10:53:34 -04:00
Andy Goldstein
18332a6073 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
Arnaud Porterie
57ceb4a402 Merge pull request #9882 from ibuildthecloud/labels
Proposal: One Meta Data to Rule Them All => Labels
2015-03-16 20:20:05 -07:00
Jessie Frazelle
8cd2a81fd8 Merge pull request #11420 from estesp/reexec-path-fix
Fix relative path execution of docker daemon in reexec.Self()
2015-03-16 14:57:25 -07:00
Lars Kellogg-Stedman
ef50a94a9c fix various problems with iptables.Exists
This modifies iptables.Exists so that it must be called with an explicit
table and chain.  This allows us (a) to generate an appropriate command
line for "iptables -C", which was not previously possible, and (b) it
allows us to limit our strings.Contains() search to just the table and
chain in question, preventing erroneous matches against unrelated rules.

Resolves #10781

Signed-off-by: Lars Kellogg-Stedman <lars@redhat.com>
2015-03-16 17:14:45 -04:00
Sachin Joshi
27c2a55648 Use syscall consts, check for errors,
Also rename func for non-windows specific names.

Signed-off-by: Sachin Joshi <sachin_jayant_joshi@hotmail.com>
2015-03-16 14:04:56 -07:00
Sachin Joshi
c23a02e41a Move windows console specific implementation in sub package
Signed-off-by: Sachin Joshi <sachin_jayant_joshi@hotmail.com>
2015-03-16 14:04:53 -07:00
Sachin Joshi
ce22032e9b ANSI terminal emulation for windows
It is implemented by intercepting and interpreting the output
escape sequence by calling win32 console apis.

In addition the input from win32 console is translated to linux keycodes

Signed-off-by: Sachin Joshi <sachin_jayant_joshi@hotmail.com>
2015-03-16 14:04:49 -07:00
Phil Estes
c1642c937d Fix relative path execution of docker daemon in reexec.Self()
After the new libcontainer API, the reexec.Self() output of the daemon
binary is used as the libcontainer factory InitPath.  If it is relative,
it can't be found at container start time.  This patch solves the
problem by making sure that we return a rooted/absolute path if a
relative path is used.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2015-03-16 16:52:00 -04:00
Alexander Morozov
aa11bf993a Merge pull request #10977 from robertabbott/10959-progressreader
Moves progressreader from utils to its own package
2015-03-16 12:45:33 -07:00
Alexander Morozov
f9b208001f Merge pull request #11323 from delftswa2014/utils-daemon-windows
Make utils_daemon and volumes.go cross-platform compileable (Windows).
2015-03-16 12:14:30 -07:00
Rik Nijessen
a5e54d5788 Make utils_daemon and volumes cross-platform compileable.
Signed-off-by: Rik Nijessen <riknijessen@gmail.com>
2015-03-16 11:46:07 +01:00
Arnaud Porterie
b57fba2430 Merge pull request #11076 from hqhq/hq_use_warning_in_sysinfo
use type WARN for warning
2015-03-15 21:13:23 -07:00
Darren Shepherd
6311ff4ab2 Set labels on container create
Signed-off-by: Darren Shepherd <darren@rancher.com>
2015-03-13 10:02:04 -07:00
Rick Wieman
57fa14056d Makes directory pkg compilable on Windows.
Also makes the test cases platform independent.

Signed-off-by: Rick Wieman <git@rickw.nl>
2015-03-12 15:54:22 +01:00
Ahmet Alp Balkan
718f112173 Make use of %USERPROFILE% in cli help message
An earlier commit was causing docker windows CLI build to not to pick up
the shorthand form for home directory (`%USERPROFILE%`) shown in when
`docker --help` is executed.

Fixing that bug and making the if statement concise and clear.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-03-11 02:14:49 -07:00
bobby abbott
2d49e3ce35 Remove import to utils in progressreader
Added method in StreamFormatter to handle calls
from progressreader. Solves #10959

Signed-off-by: bobby abbott <ttobbaybbob@gmail.com>
2015-03-11 00:50:27 -07:00
Qiang Huang
d16f6bdb38 fix warning messages
Use log.Warnf instead of log.Infof, and remove redundant `WARNING` prefix.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-03-11 08:47:45 +08:00
Jessie Frazelle
c7bac5a484 Merge pull request #11288 from estesp/warn-on-localhost-dns
Add warning for --dns flag set to localhost addresses.
2015-03-10 12:03:46 -07:00
Phil Estes
716b0cd3b4 Add warning for --dns flag set to localhost addresses.
We should warn users who use the `--dns` command line option to point
DNS to a localhost address, either IPv4 or IPv6.  Unless they have
specifically set up the container as a DNS server or are using
--net=host (which is why this should be allowed, but warned on because
those are pretty unique cases) a localhost address as a resolver will
not reach what they might expect (e.g. expecting it will hit localhost
on the Docker daemon/host).

Added a test for the message, and fixed up tests to separate stdout and
stderr that were using `--dns=127.0.0.1` to test the options.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2015-03-10 14:43:17 -04:00
Dan Walsh
0586d52a00 If $HOME is not set, return homedir from /etc/passwd
Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2015-03-10 10:00:22 -04:00
Arnaud Porterie
29e7195aaf Remove subdirectories MAINTAINERS files
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-03-06 18:21:51 -08:00