Commit graph

1601 commits

Author SHA1 Message Date
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
Tibor Vass
0a46fb04bc Merge pull request #11148 from ahmetalpbalkan/win-cli/chmod-x-fix
pkg/archive: adjust chmod bits on windows
2015-03-06 12:28:58 -05:00
Ahmet Alp Balkan
be592674ac pkg/archive_windows: make use of os.PathSeparator
cc: @jhowardmsft

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-03-05 17:15:11 -08:00
Michael Crosby
c0b5b9cafe Merge pull request #11064 from delftswa2014/10970-treesize
Move directory size calculation to pkg/ (fixes #10970)
2015-03-05 13:06:02 -08:00
Ahmet Alp Balkan
276ed4fec4 pkg/archive: adjust chmod bits on windows
This change modifies the chmod bits of build context archives built on
windows to preserve the execute bit and remove the r/w bits from
grp/others.

Also adjusted integ-cli tests to verify permissions based on the platform
the tests are running.

Fixes #11047.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-03-04 14:10:37 -08:00
Martijn Dwars
973377a70d Move directory size calculation to pkg/ (fixes #10970)
Signed-off-by: Martijn Dwars <ikben@martijndwars.nl>
2015-03-04 21:16:31 +01:00
Tibor Vass
359ced0e44 Merge pull request #11147 from ahmetalpbalkan/archive_test_fix
pkg/archive: rm invalid test case from achive_windows_test.go
2015-03-04 09:51:36 -05:00
Jessie Frazelle
a0fb44fd1a Merge pull request #9437 from cpuguy83/set_rlimits_in_container
Allow setting ulimits for containers
2015-03-04 04:00:17 -08:00
Ahmet Alp Balkan
d33c7828b7 pkg/archive: rm invalid test case from achive_windows_test.go
Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-03-03 18:42:52 -08:00
Iavael
b3060011bb Fixed handling hardlinks to symlinks in tar stream
Signed-off-by: Iavael <iavaelooeyt@gmail.com>
2015-03-03 16:10:53 +03:00
Jessie Frazelle
2a627ca2f7 Merge pull request #11002 from ahmetalpbalkan/win-cli/dockerfile-path-fix
Support windows style dockerfile paths for build cmd
2015-02-27 11:57:19 -08:00
Phil Estes
f2d40e9713 Merge pull request #11017 from brahmaroutu/random_10962
moving random.go from utils
2015-02-26 21:35:42 -05:00
Srini Brahmaroutu
38752a5727 moving random.go from utils
Closes #10962
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-02-26 18:31:18 +00:00
Brian Goff
cabcc398f6 Allow setting ulimits for containers
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-02-25 19:37:43 -05:00
Rik Nijessen
ee25c29598 Rename package timeout to timeoutconn.
Signed-off-by: Rik Nijessen <riknijessen@gmail.com>
2015-02-25 20:52:37 +01:00
Rik Nijessen
140d563d98 Move TimeoutConn to seperate pkg dir.
Fixes #10965
Signed-off-by: Rik Nijessen <riknijessen@gmail.com>
2015-02-25 17:09:47 +01:00
Ahmet Alp Balkan
140f461f50 Support windows style dockerfile paths for build cmd
Currently TestBuildRenamedDockerfile fails since passing
custom dockerfile paths like:

    docker build -f dir/file .

fails on windows because those are unix paths. Instead, on
windows accept windows style paths like:

    docker build -f dir\file .

and convert them to unix style paths using the helper we
have in `pkg/archive` so that daemon can correctly locate
the path in the context.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-02-24 20:23:53 -08:00
Srini Brahmaroutu
c9b4e665f9 Removing dependencies from pkg into Docker internal code
Closes #10922

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-02-23 18:43:10 +00:00
Alexander Morozov
3d26fc868b Merge pull request #10439 from estesp/10426-fix-arg-list-too-long
Pass excludes/options to tar unarchiver via environment versus cmd line
2015-02-20 23:48:55 -08:00