Commit graph

1020 commits

Author SHA1 Message Date
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
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
Michael Crosby
c44eed6358 Merge pull request #10865 from ahmetalpbalkan/win-cli/tar-path
pkg/archive: Canonicalize stored paths
2015-02-20 17:20:51 -08:00
Doug Davis
9ac0da4578 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>
2015-02-19 22:21:17 -08:00
Phil Estes
2c7172b274 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)
2015-02-19 17:53:39 -08:00
Alexander Morozov
de0ed79618 Merge pull request #10819 from jsdir/10815-relative-path-fix
Fixed relative filepath check
2015-02-19 12:54:44 -08:00
Ahmet Alp Balkan
78a51d2d2c 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>
2015-02-18 23:04:56 -08:00
Ahmet Alp Balkan
3907f3c2b6 pkg/homedir: implement GetShortcutString()
Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-02-18 22:56:03 -08:00
Ahmet Alp Balkan
588f95dca0 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>
2015-02-17 16:51:04 -08:00
Jason Sommer
eba8586d2b Fixed relative filepath check
Signed-off-by: Jason Sommer <jsdirv@gmail.com>
2015-02-16 20:38:52 -06:00
Tianon Gravi
ed92fa5a28 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>
2015-02-13 15:50:42 -07:00
Michael Crosby
35464d7db3 Merge pull request #10424 from LK4D4/fix_non_tailed_log_format
Fix logs, so now, old and followed logs has same format without []
2015-02-06 14:35:45 -08:00
Michael Crosby
7637041156 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
2015-02-06 14:01:28 -08:00
Tibor Vass
6a360227e4 Merge pull request #10612 from vbatts/vbatts-archive_sort
pkg/archive: sort files
2015-02-06 16:50:53 -05:00
Ahmet Alp Balkan
2c44d13150 Export $HOME lookup to pkg/homedir
Signed-off-by: Ahmet Alp Balkan <ahmetb@microsoft.com>
2015-02-06 11:42:45 -08:00
Vincent Batts
ecf82746a8 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>
2015-02-06 18:14:38 +01:00
Vincent Batts
c059e6d158 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>
2015-02-06 18:13:57 +01:00
Jessie Frazelle
193aa34569 Merge pull request #10547 from duglin/Issue10214
Pretty the help text
2015-02-04 11:31:18 -08:00
Doug Davis
9bc2b3482b 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>
2015-02-04 07:59:16 -08:00
Chen Hanxiao
b7f328a24b fix comments typos
s/propogated/propagated

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2015-02-04 10:47:37 +08:00
Alexander Morozov
905242e00a Fix logs, so now, old and followed logs has same format without []
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-01-28 17:57:10 -08:00
Michael Crosby
810a000d6b Merge pull request #10197 from vbatts/vbatts-dm_cookie_support
devicemapper: API for cookie support
2015-01-27 11:44:03 -08:00
Arnaud Porterie
95fe485137 Merge pull request #10305 from jlhawn/use_tarsum_v1
Always store images with tarsum.v1 checksum added
2015-01-26 14:42:07 -08:00
unclejack
4c55c3aa45 pkg/archive: remove tar autodetection log line
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
2015-01-24 08:43:03 +02:00
Josh Hawn
d01b451dd5 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)
2015-01-23 11:30:27 -08:00
Ian Babrou
eec1af54d1 Not doing extra assertion for io.Closer
Signed-off-by: Ian Babrou <ibobrik@gmail.com>
2015-01-22 10:36:20 +03:00
Andrew C. Bodine
2da8e34079 Closes #9311 Handles container id/name collisions against daemon functionalities according to #8069
Signed-off-by: Andrew C. Bodine <acbodine@us.ibm.com>
2015-01-21 17:11:31 -08:00
Jessie Frazelle
feb02197c1 Merge pull request #10231 from estesp/move-iptables-check
Move iptables check out of runtime init() to separate function
2015-01-21 10:46:40 -08:00
Michael Crosby
a96214b8c6 Remove publisher if no one is listening
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-01-20 20:21:47 -08:00
Michael Crosby
eff8e3294c Add pubsub package to handle robust publisher
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-01-20 20:21:46 -08:00
Phil Estes
3ffffc0cff 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)
2015-01-20 21:04:22 -05:00
99232a99a9 Merge pull request #10222 from vbatts/vbatts-dm_flag_and_output
dm flag and output
2015-01-20 18:45:43 -05:00
bfb4954a1f Merge pull request #10193 from vbatts/vbatts-dm_logging
devmapper: initialize log levels
2015-01-20 14:06:01 -05:00