Commit Graph

994 Commits

Author SHA1 Message Date
e6f3051dc3 Merge pull request #11288 from estesp/warn-on-localhost-dns
Add warning for --dns flag set to localhost addresses.
Upstream-commit: 8be1671f451079b3567689c19ccc310266d026cd
Component: engine
2015-03-10 12:03:46 -07:00
53af0dd72f 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)
Upstream-commit: afa92a9af0f1a77ef25aab73b11aa855a1823666
Component: engine
2015-03-10 14:43:17 -04:00
d32c83b25c If $HOME is not set, return homedir from /etc/passwd
Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: 42aec0c771fbc43398d02822383942ddcea49cb9
Component: engine
2015-03-10 10:00:22 -04:00
5506a9a27c Remove subdirectories MAINTAINERS files
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 89bdaa35e04b74b7c6528783e0f7b8154b2a3d31
Component: engine
2015-03-06 18:21:51 -08:00
a0c6b78604 Merge pull request #11148 from ahmetalpbalkan/win-cli/chmod-x-fix
pkg/archive: adjust chmod bits on windows
Upstream-commit: a6ddb8de42c731ae8f9e0e1becc2a93a56158a58
Component: engine
2015-03-06 12:28:58 -05:00
15e04c816c pkg/archive_windows: make use of os.PathSeparator
cc: @jhowardmsft

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: 8ba64b383dee8827c70f9c0a0d71aa61d0f0c595
Component: engine
2015-03-05 17:15:11 -08:00
04c84acfda Merge pull request #11064 from delftswa2014/10970-treesize
Move directory size calculation to pkg/ (fixes #10970)
Upstream-commit: 92e632c84e7b1abc1a2c5cb3a22e0725951a82af
Component: engine
2015-03-05 13:06:02 -08:00
71919ac23a 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>
Upstream-commit: 1a22418f9f1573ca8521831d52c8e0562cb3ef8f
Component: engine
2015-03-04 14:10:37 -08:00
459803f719 Move directory size calculation to pkg/ (fixes #10970)
Signed-off-by: Martijn Dwars <ikben@martijndwars.nl>
Upstream-commit: e2b8933d213b283578babc1d86538950295e4fc7
Component: engine
2015-03-04 21:16:31 +01:00
031bee35d5 Merge pull request #11147 from ahmetalpbalkan/archive_test_fix
pkg/archive: rm invalid test case from achive_windows_test.go
Upstream-commit: 973c32c8a07bca01aa5889689f37b99694673490
Component: engine
2015-03-04 09:51:36 -05:00
36f1975bfd Merge pull request #9437 from cpuguy83/set_rlimits_in_container
Allow setting ulimits for containers
Upstream-commit: df7ba57f5f962b1a2d2e267a89ae465541a92371
Component: engine
2015-03-04 04:00:17 -08:00
e76b08f45b pkg/archive: rm invalid test case from achive_windows_test.go
Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: baebff38d5f5d1cdecbc2544e22a42acf82bbf93
Component: engine
2015-03-03 18:42:52 -08:00
ec994adca7 Merge pull request #11002 from ahmetalpbalkan/win-cli/dockerfile-path-fix
Support windows style dockerfile paths for build cmd
Upstream-commit: 1061c56a5fc126a76344ea9dca9aa5f5e75eb902
Component: engine
2015-02-27 11:57:19 -08:00
2d06b1cf02 Merge pull request #11017 from brahmaroutu/random_10962
moving random.go from utils
Upstream-commit: f5850e8e30b9420d26bd12136d8bbb6669d1e2bb
Component: engine
2015-02-26 21:35:42 -05:00
e051d5c51d moving random.go from utils
Closes #10962
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 53ece336dcab8e778fc37afc7a264f7d168110ff
Component: engine
2015-02-26 18:31:18 +00:00
2e0ec2c817 Allow setting ulimits for containers
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 3f39050637d454e9ee8075153a917c8bfccb5bae
Component: engine
2015-02-25 19:37:43 -05:00
967da32c28 Rename package timeout to timeoutconn.
Signed-off-by: Rik Nijessen <riknijessen@gmail.com>
Upstream-commit: 7e7646c28a599731e62afec4c0c4dc0942309b7f
Component: engine
2015-02-25 20:52:37 +01:00
88b1d37e3b Move TimeoutConn to seperate pkg dir.
Fixes #10965
Signed-off-by: Rik Nijessen <riknijessen@gmail.com>
Upstream-commit: 690a85797e70c3816a1dec768bff0c454e1e23a9
Component: engine
2015-02-25 17:09:47 +01:00
bdccc883c1 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>
Upstream-commit: 5ecab9e831c6d39e649430013087a3e2a85fb949
Component: engine
2015-02-24 20:23:53 -08:00
bdb65abebf Removing dependencies from pkg into Docker internal code
Closes #10922

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 7a9c944b827dc0cd416d701fe6460264f05166bb
Component: engine
2015-02-23 18:43:10 +00:00
9de48f55f2 Merge pull request #10439 from estesp/10426-fix-arg-list-too-long
Pass excludes/options to tar unarchiver via environment versus cmd line
Upstream-commit: f207dd5e7c3a99b1f26014a575197e8b9cc41ed8
Component: engine
2015-02-20 23:48:55 -08:00
4ab4d22713 Merge pull request #10865 from ahmetalpbalkan/win-cli/tar-path
pkg/archive: Canonicalize stored paths
Upstream-commit: 1d382f9c2d368adfea5b12316e3836ec82bd8d81
Component: engine
2015-02-20 17:20:51 -08:00
efffe9523d Fix for help when $HOME is /
estesp noticed that when $HOME is / the ~ substitutions messes up
becuase it tries to replace all paths that start with "/" with "~".
This fixes it so that it will only replace it when $HOME isn't "/".

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 116367eb07351125754aef01f7d3da152b018710
Component: engine
2015-02-19 22:21:17 -08:00
044126e88b Pass excludes/options to tar unarchiver via environment
Fixes #10426

Because of the ability to easily overload the shell max argument list
length once the image count is several hundred, `docker load` will
start to fail because of this as it passes an excludes list of all
images in the graph.  This patch uses an environment variable with the
json marshalled through it to get around the arg length limitation.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 743c9ba1fb1d946ac99bc86fb573341b2d5a0a8b
Component: engine
2015-02-19 17:53:39 -08:00
ae2aead6a0 Merge pull request #10819 from jsdir/10815-relative-path-fix
Fixed relative filepath check
Upstream-commit: 08544a89ebdb781234fd559230c5cde30da4503b
Component: engine
2015-02-19 12:54:44 -08:00
a45709a819 Shorten printed Windows paths on docker help cmd
This makes use of `%USERPROFILE%` as a substitute for
`~` on Windows and prints shorter strings for default
cert paths etc.

Also removes string escaping/quotes around default
path values printed in `docker help` command as they
are not really necessary and adds double backslashes
(\\) on windows.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: 1c9b37cb965be459a93ce07539d7b2a53fbdbc6a
Component: engine
2015-02-18 23:04:56 -08:00
e82a370fd1 pkg/homedir: implement GetShortcutString()
Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: 8ca37e47607b16535468eb119e90567d4f598b8f
Component: engine
2015-02-18 22:56:03 -08:00
b5e8758d2a pkg/archive: Canonicalize stored paths
Currently pkg/archive stores nested windows files with
backslashes (e.g. `dir\`, `dir\file.txt`) and this causes
tar not being correctly extracted on Linux daemon.

This change assures we canonicalize all paths to unix
paths and add them to tar with that name independent of platform.

Fixes the following test cases for Windows CI:
- TestBuildAddFileWithWhitespace
- TestBuildCopyFileWithWhitespace
- TestBuildAddDirContentToRoot
- TestBuildAddDirContentToExistingDir
- TestBuildCopyDirContentToRoot
- TestBuildCopyDirContentToExistDir
- TestBuildDockerignore
- TestBuildEnvUsage
- TestBuildEnvUsage2

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: 28842d3f093e69cf62a090a532aacba1e6ff6d1c
Component: engine
2015-02-17 16:51:04 -08:00
05210fc269 Fixed relative filepath check
Signed-off-by: Jason Sommer <jsdirv@gmail.com>
Upstream-commit: 0826ac1581bdb71b889a0cb260422ce985aca317
Component: engine
2015-02-16 20:38:52 -06:00
ac657c8159 Rename BINDDIR to BIND_DIR
It turns out the back-to-back `D`s here were tripping people up because visually, it looks like a typo.  This renames the variable to `BIND_DIR`, but allows `BINDDIR` to continue working for backwards-compatibility.

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
Upstream-commit: 987050a52b0ce6d5ae77554a03af5923304bd3e5
Component: engine
2015-02-13 15:50:42 -07:00
440786c4fd Merge pull request #10424 from LK4D4/fix_non_tailed_log_format
Fix logs, so now, old and followed logs has same format without []
Upstream-commit: e4a49ae1885a7f80e713d1d1fc852f6e4214dfe6
Component: engine
2015-02-06 14:35:45 -08:00
dfd79f3c67 Merge pull request #9705 from acbodine/9311-truncindex-error-duplicate-id-on-ambiguous-id
Closes #9311 Handles container id/name collisions against daemon functionalities according to #8069
Upstream-commit: 34c804a139cc086e9fa6d3f99442f083b6d5e1e7
Component: engine
2015-02-06 14:01:28 -08:00
f888d788f6 Merge pull request #10612 from vbatts/vbatts-archive_sort
pkg/archive: sort files
Upstream-commit: 02e50999f56e7f02d670494b101e677bc1001987
Component: engine
2015-02-06 16:50:53 -05:00
62119ca587 Export $HOME lookup to pkg/homedir
Signed-off-by: Ahmet Alp Balkan <ahmetb@microsoft.com>
Upstream-commit: f9ae2d4fd4c5b4afb7a2299b93a800f718b63a2a
Component: engine
2015-02-06 11:42:45 -08:00
084e9ad0b5 pkg/archive: test that confirms hardlink ordering
This test was written against
master(abdfb21e3a761efdd70614de42905ff7911c5372) as a failing test, but
works with this patch set.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 899a2dda097a57a12f8794ded4a706781173aa5d
Component: engine
2015-02-06 18:14:38 +01:00
6910db2df7 pkg/archive: sort files
sort changes found and exported.

Sorting the files before appending them to the tar archive
would mean a dependable ordering for types like hardlinks.

Also, combine sort logic used

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 32d6d49539f5876e6ef75f00db917d8a3aaa0569
Component: engine
2015-02-06 18:13:57 +01:00
8423899da1 Merge pull request #10547 from duglin/Issue10214
Pretty the help text
Upstream-commit: a271eaeba224652e3a12af0287afbae6f82a9333
Component: engine
2015-02-04 11:31:18 -08:00
013dbb146f Pretty the help text
This modifies the "docker help" text so that it is no wider than 80 chars
and each description fits on one line. This will also try to use ~ when
possible

Added a test to make sure we don't go over 80 chars again.
Added a test to make sure we use ~

Applied rules/tests to all docker commands - not just main help text

Closes #10214

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 2203b37733e76d653cfe3b0ec5870786076adce7
Component: engine
2015-02-04 07:59:16 -08:00
5bd881552f fix comments typos
s/propogated/propagated

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
Upstream-commit: ef3192f161a89bbff11d88da523be61484a822f2
Component: engine
2015-02-04 10:47:37 +08:00
b0b84165b4 Fix logs, so now, old and followed logs has same format without []
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: e16bcc3928d0ae07cb9c02840fbb92f1ed2a7a3f
Component: engine
2015-01-28 17:57:10 -08:00
dbb2daa29d Merge pull request #10197 from vbatts/vbatts-dm_cookie_support
devicemapper: API for cookie support
Upstream-commit: c81fb7fa4a41dfdc21eb37dade0eb71bd1dfa855
Component: engine
2015-01-27 11:44:03 -08:00
c4558ad58c Merge pull request #10305 from jlhawn/use_tarsum_v1
Always store images with tarsum.v1 checksum added
Upstream-commit: bfa0dc47da2d9e6399fa32bda72a7074224c815d
Component: engine
2015-01-26 14:42:07 -08:00
299d22c2cc pkg/archive: remove tar autodetection log line
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: a5cc1c556dcd6dfe5c1aed4bec95aaff6ddfad61
Component: engine
2015-01-24 08:43:03 +02:00
cc58d5c62d Always store images with tarsum.v1 checksum added
Updates `image.StoreImage()` to always ensure that images
that are installed in Docker have a tarsum.v1 checksum.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: ba3bad66f92da057dba2a43ff9a512cf7ad72375
Component: engine
2015-01-23 11:30:27 -08:00
ce792ad046 Not doing extra assertion for io.Closer
Signed-off-by: Ian Babrou <ibobrik@gmail.com>
Upstream-commit: 4d10b32380793ce5e324a429ce2db60125aae205
Component: engine
2015-01-22 10:36:20 +03:00
685b876322 Closes #9311 Handles container id/name collisions against daemon functionalities according to #8069
Signed-off-by: Andrew C. Bodine <acbodine@us.ibm.com>
Upstream-commit: d25a65375c880017ac0c516389b0b7afde810517
Component: engine
2015-01-21 17:11:31 -08:00
dcea23baf1 Merge pull request #10231 from estesp/move-iptables-check
Move iptables check out of runtime init() to separate function
Upstream-commit: f3aed2a2974bba4fdca947227d877bcc2c7d540b
Component: engine
2015-01-21 10:46:40 -08:00
b793c28c03 Remove publisher if no one is listening
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 217a2bd1b62788e53fd38810b30672db58a4efc5
Component: engine
2015-01-20 20:21:47 -08:00
045cd9fe99 Add pubsub package to handle robust publisher
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 2f46b7601a3f5e11359b79624d73075b69778fbb
Component: engine
2015-01-20 20:21:46 -08:00
42697702c5 Move iptables check out of runtime init() to separate function
Due to the iptables package being `init`ed at start of the docker
runtime, this means the iptables --wait command listing all rules
is run, no matter if the command is simply "docker -h".  It makes
more sense to both locate the iptables command and check for the
wait flag support at the time iptables is actually used, as it
may not be used at all if certain network support is off/configured
differently.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 5e8285b08120f674b12a34c3f146216f6854a173
Component: engine
2015-01-20 21:04:22 -05:00