Commit Graph

8208 Commits

Author SHA1 Message Date
lalyos ad35d522db Fixes 5370 infinite/maxLoopCount loop for relative symlinks
use path.IsAbs() instead of checking if first char is '/'

Docker-DCO-1.1-Signed-off-by: Lajos Papp <lajos.papp@sequenceiq.com> (github: lalyos)
2014-05-16 01:03:11 +02:00
lalyos b51c366bfc Defend against infinite loop when following symlinks
ideally it should never reach it, but there was already multiple issues with infinite loop
at following symlinks. this fixes hanging unit tests

Docker-DCO-1.1-Signed-off-by: Lajos Papp <lajos.papp@sequenceiq.com> (github: lalyos)
2014-05-16 00:47:20 +02:00
lalyos 8b77a5b7ae Adding test case for symlink causes infinit loop, reproduces: dotcloud#5370
normally symlinks are created as either
ln -s /path/existing /path/new-name
or
cd /path && ln -s ./existing new-name

but one can create it this way
cd /path && ln -s existing new-name

this drives FollowSymlinkInScope into infinite loop

Docker-DCO-1.1-Signed-off-by: Lajos Papp <lajos.papp@sequenceiq.com> (github: lalyos)
2014-05-16 00:47:20 +02:00
James Turnbull e5a5808f51 Merge pull request #5820 from joelhandwell/patch-1
changed deprecated option styles to supported ones
2014-05-16 00:40:16 +02:00
Victor Vieux 041dbcb7be Merge pull request #5826 from tianon/add-cross-to-test
Add "cross" to the "test" Makefile target
2014-05-15 15:35:18 -07:00
Tianon Gravi 8ec01f9dc1 Add "cross" to the "test" Makefile target
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-05-15 16:21:17 -06:00
Joel Handwell 10a320818e changed deprecated option styles to supported ones
-name and -rm to --name and --rm
2014-05-15 10:50:59 -04:00
Sven Dowideit 5dfe7c43d4 Merge pull request #5816 from unclejack/docs_run_cache
docs: explain when RUN cache gets invalidated
2014-05-15 19:54:15 +10:00
unclejack 239d1ef301 docs: explain when RUN cache gets invalidated
This adds a few lines to the RUN Dockerfile docs to explain how to
bypass the RUN caching and how ADD can also invalidate the cache for
these instructions.

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-05-15 12:32:01 +03:00
Sven Dowideit 8887e00630 Merge pull request #5762 from SvenDowideit/pr_out_add_some_more_specific_help_for_dockerfile_build_contexts
Add some more specific help for Dockerfile build contexts.
2014-05-15 11:03:22 +10:00
Solomon Hykes 8d213e91b3 Merge pull request #5706 from vieux/remove_add_string 2014-05-14 17:31:52 -07:00
James Turnbull db4d534b5b Merge pull request #5800 from jamtur01/paras
Updated a bunch of formatting in the docs/sources/use files
2014-05-15 01:58:14 +02:00
SvenDowideit ed703fc8be Add some more specific help for Dockerfile build contexts.
I've copy and pasted the error message so its googlable.

Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
2014-05-15 09:41:05 +10:00
Sven Dowideit d9e3d88082 Merge pull request #5801 from jamtur01/fixups
Minor fixups to the Docs README
2014-05-15 09:38:52 +10:00
James Turnbull 2269472f3a Updated a bunch of formatting in the docs/sources/use files
Docker-DCO-1.1-Signed-off-by: James Turnbull <james@lovedthanlost.net> (github: jamtur01)
2014-05-15 01:26:36 +02:00
Michael Crosby 6ff6aad9b8 Merge pull request #5809 from crosbymichael/move-cgroups
Move cgroups package into libcontainer
2014-05-14 16:06:32 -07:00
Michael Crosby b22d10e3c5 Remove the cgroups maintainer file
We don't need this because it is covered by the libcontainer MAINTAINERS
file
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-05-14 16:01:45 -07:00
Michael Crosby b0578d0ac7 Merge pull request #5772 from unclejack/improve_commit_performance
process directories in parallel in ChangesDirs
2014-05-14 15:49:11 -07:00
Michael Crosby 3b7a19def6 Move cgroups package into libcontainer
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-05-14 15:21:44 -07:00
Tianon Gravi 8904dfe082 Merge pull request #5657 from tianon/sysvinit-should-start
Add "Should-Start" cgroupfs-mount and cgroup-lite to sysvinit-debian init script
2014-05-14 16:05:32 -06:00
Michael Crosby 76f09c2ecf Merge pull request #5807 from crosbymichael/dev-symlinks
Setup standard /dev symlinks
2014-05-14 14:17:33 -07:00
Victor Vieux 49deffe6fe Merge pull request #5806 from icecrime/5766-events_endless_newlines
Issue #5766 - Check channel closed state in /events loop
2014-05-14 14:09:26 -07:00
O.S. Tezer 343c24a5fa Merge pull request #5805 from joelhandwell/patch-2
changed deprecated -name option to --name
2014-05-14 22:09:17 +01:00
O.S. Tezer 79be9f8d7f Merge pull request #5804 from joelhandwell/patch-1
changed deprecated -rm option to --rm
2014-05-14 22:08:01 +01:00
unclejack 359f8aca29 process directories in parallel in ChangesDirs
This commit lowers the total time spent in ChangesDirs to half during a
commit.

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-05-15 00:03:33 +03:00
Bernerd Schaefer 2bc34036b9 Setup standard /dev symlinks
After copying allowed device nodes, set up "/dev/fd", "/dev/stdin",
"/dev/stdout", and "/dev/stderr" symlinks.

Docker-DCO-1.1-Signed-off-by: Bernerd Schaefer <bj.schaefer@gmail.com> (github: bernerdschaefer)
[rebased by @crosbymichael]
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-05-14 13:59:13 -07:00
Arnaud Porterie 8699f53e6a Check channel closed state in /events loop
When listener channel is closed, it becomes always available for
reading: select becomes an active loop which writes default-constructed
events (i.e: empty strings).

Fixes #5766.

Docker-DCO-1.1-Signed-off-by: Arnaud Porterie <arnaud.porterie@gmail.com> (github: icecrime)
2014-05-14 22:35:04 +02:00
Guillaume J. Charmes 17a1f470ae Merge pull request #5783 from LK4D4/fix_duplicate_ip_allocation_#5729
Fix duplicate ip allocation
2014-05-14 13:32:27 -07:00
Joel Handwell 2d622df835 changed deprecated -name option to --name
changed deprecated -name option to --name
2014-05-14 16:24:08 -04:00
Joel Handwell 137f4b326a changed deprecated -rm option to --rm
changed deprecated -rm option to --rm
2014-05-14 16:22:38 -04:00
Michael Crosby 4af465fccf Merge pull request #5720 from cyphar/5656-cp-absolute-paths
Ensure `docker cp` cannot traverse outside container rootfs
2014-05-14 11:46:11 -07:00
Victor Vieux d066ceaa4f Merge pull request #5752 from crosbymichael/fix-port-mapping-ps
Fix port mapping in ps display for public and private
2014-05-14 11:36:23 -07:00
Victor Vieux bc22c9948c Merge pull request #5756 from crosbymichael/move-units-to-pkg
Move duration and size to units pkg
2014-05-14 11:36:14 -07:00
Victor Vieux c78b390b6c Merge pull request #5780 from vbatts/vbatts-start_tarsum_test
tarsum: start a test for TarSum
2014-05-14 11:28:26 -07:00
James Turnbull a50a46048b Minor fixups to the Docs README
Docker-DCO-1.1-Signed-off-by: James Turnbull <james@lovedthanlost.net> (github: jamtur01)
2014-05-14 20:14:06 +02:00
James Turnbull d9b1c1976f Merge pull request #5787 from SvenDowideit/pr_out_add_a_mention_of_80_column_lines_and_reflow_the_document_to_hide_the_evidence
Add a mention of 80 column lines and reflow the document to hide the evidence.
2014-05-14 20:13:48 +02:00
Michael Crosby de406b69f3 Merge pull request #5798 from unclejack/fix_startup_speed
don't update Suffixarray for every Register during startup
2014-05-14 11:13:02 -07:00
Michael Crosby 432e42e715 Merge pull request #5791 from bernerdschaefer/nsinit-exec-forwards-signals
"nsinit exec ..." forwards signals to container
2014-05-14 11:05:27 -07:00
Victor Vieux 3bf1b562e3 Merge pull request #5781 from creack/remove_bind_console
Remove the bind mount for dev/console which override the mknod/label
2014-05-14 10:57:21 -07:00
unclejack fc82199d4f Merge pull request #5758 from crosbymichael/add-cpuset
Add cpuset cpus support for docker
2014-05-14 20:57:12 +03:00
Victor Vieux b561f0398a Merge pull request #5794 from unclejack/speed_up_ps
don't call sort for every add in daemon/history
2014-05-14 10:48:08 -07:00
Vincent Batts d153740d9c tarsum: adding benchmarks
to cover a couple of use-cases:
* 1mb file, using no compression
* 1mb file, using compression
* 1024 1k files, using no compression
* 1024 1k files, using compression

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
2014-05-14 11:48:17 -04:00
unclejack 5d5c89398c update Suffixarray only once during daemon startup
This commit makes the Docker daemon call UpdateSuffixarray only after
it finishes registering all containers.

This lowers the amount of time required for the Docker daemon to start
up.

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-05-14 17:58:37 +03:00
unclejack 219b7ae8b5 add UpdateSuffixarray and refactor TruncIndex
This commit refactors TruncIndex to make it possible to add container
ids to the TruncIndex without updating the Suffixarray.

This is useful during the Docker daemon's startup when we don't want to
update the Suffixarray for every container we add.

Add continues to function like before.

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-05-14 17:57:59 +03:00
unclejack e963179c79 don't call sort for every add in history
This moves the call to sort in daemon/history to a function to be
called explicitly when we're done adding elements to the list.

This speeds up `docker ps`.

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-05-14 15:02:02 +03:00
Bernerd Schaefer 830c2d7fa3 "nsinit exec ..." forwards signals to container
Docker-DCO-1.1-Signed-off-by: Bernerd Schaefer <bj.schaefer@gmail.com> (github: bernerdschaefer)
2014-05-14 11:01:02 +02:00
James Turnbull cb0f2a2823 Merge pull request #5785 from SvenDowideit/pr_out_subject_and_object_containers_can_be_confused
Subject and object containers can be confused
2014-05-14 07:56:31 +02:00
Alexandr Morozov 80fca061e7 Change ip allocation logic
Now IP reuses only after all IPs from network was allocated
Fixes #5729

Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
2014-05-14 06:43:10 +04:00
Alexandr Morozov 5128feb690 Refactoring collections/orderedintset and benchmarks for it
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
2014-05-14 06:04:12 +04:00
Michael Crosby adbe3096e8 Add cpuset cpus support for docker
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-05-13 18:17:12 -07:00