Commit graph

296 commits

Author SHA1 Message Date
Michael Crosby
ddb2086ca9 Copy values out of hostConfig
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-07-22 00:16:26 -07:00
Michael Crosby
a091d949ac Always mark as stopped for non running containers
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-07-21 19:59:44 -07:00
Timothy
7aed2130f9 Give context for the error that occures when you try to bind mount a volume with a relative path
Docker-DCO-1.1-Signed-off-by: Timothy <timothyhobbs@seznam.cz> (github: timthelion)
2014-07-19 04:12:16 +00:00
unclejack
1646e5d69a Merge pull request #7069 from crosbymichael/update-libcontainer-july3
Update libcontainer to be85764f109c3f0f62cd2a5c8be
2014-07-18 22:34:22 +03:00
unclejack
dca52c47a4 Merge pull request #7055 from coheyxyz/break-loop
Break loop correctly
2014-07-17 18:20:12 +03:00
Kohei Tsuruta
ffe885ec0e Change switch to if so that the break statements correctly breaks loop
Docker-DCO-1.1-Signed-off-by: Kohei Tsuruta <coheyxyz@gmail.com> (github: coheyxyz)
2014-07-17 20:27:29 +09:00
Michael Crosby
7a8ea91392 Fix cross compile non cgo and linux systems
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-07-16 16:57:49 -07:00
Michael Crosby
0d67b420b5 Make tty term exec driver specific
lxc is special in that we cannot create the master outside of the
container without opening the slave because we have nothing to provide to the
cmd.  We have to open both then do the crazy setup on command right now instead of
passing the console path to lxc and telling it to open up that console.  we save a couple of
openfiles in the native driver because we can do this.
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-07-16 16:57:49 -07:00
Michael Crosby
1501c342d8 Don't create pty slave in the daemon for native driver
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-07-16 16:57:19 -07:00
Victor Vieux
6d238c6fba Merge pull request #6797 from zhgwenming/master
make /.dockerinit bind mount driver specific
2014-07-16 16:01:43 -07:00
Victor Vieux
dae6af1d1c Merge pull request #7060 from crosbymichael/case-insensitive-caps
Allow case insensitive caps for add and drop
2014-07-16 12:34:59 -07:00
Michael Crosby
7c19499c63 Allow case insensitive caps for add and drop
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-07-16 11:47:55 -07:00
Michael Crosby
5702029a0f Merge pull request #6954 from LK4D4/fix_container_run_after_restart_#4766
Set state running before dumping to disk
2014-07-16 11:35:14 -07:00
Albert Zhang
b3b6e05f26 since moved the ./dockerinit mount into lxc driver, fix the lxc testcase accordingly
Docker-DCO-1.1-Signed-off-by: Albert Zhang <zhgwenming@gmail.com> (github: zhgwenming)
2014-07-15 07:56:19 -04:00
Michael Crosby
f00e643576 Update native driver for libcontainer changes
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-07-14 12:49:50 -07:00
Michael Crosby
7ebd49c49a Merge pull request #6968 from vieux/cap_add_drop
Add support for --cap-add and --cap-drop
2014-07-14 10:42:29 -07:00
Michael Crosby
b39fb160c6 Merge pull request #6970 from vieux/add_FSETID
add FSETID back to the caps whitelist
2014-07-14 10:37:04 -07:00
Alexandr Morozov
97a3807901 Set state running before dumping to disk
Fixes #4766
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
2014-07-14 21:16:27 +04:00
Victor Vieux
c04230c42b add check for invalid caps
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-07-11 23:43:21 +00:00
Victor Vieux
064b5f870d support add and drop in both order
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-07-11 23:43:21 +00:00
Victor Vieux
222a6f4401 add basic support for 'all'
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-07-11 23:43:21 +00:00
Victor Vieux
f3ff323fb3 small refactoring
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-07-11 23:43:21 +00:00
Victor Vieux
21059af3ac Basic --cap-add and --cap-drop support for lxc
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-07-11 23:43:21 +00:00
Victor Vieux
94e6dc9781 Basic --cap-add and --cap-drop support for native
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-07-11 23:43:21 +00:00
Michael Crosby
c3f247860a Merge pull request #6979 from LK4D4/fix_race_inspect_start
Use container.Lock in public ToDisk method
2014-07-11 13:44:01 -07:00
LK4D4
eae5cf1e20 Use container.Lock in public ToDisk method
Here was possible race with inspect where we changing HostConfig.Links
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
2014-07-11 23:31:03 +04:00
Victor Vieux
e8762bfe39 add FSETID back to the caps whitelist
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-07-11 00:30:56 +00:00
Timothy
e855c4b921 Add --device flag to allow additional host devices in container
We add a --device flag which can be used like:

 docker run --device /dev/sda:/dev/xvda:rwm ubuntu /bin/bash

To allow the container to have read write permissions to access the host's /dev/sda via a node named /dev/xvda in the container.

Note: Much of this code was written by Dinesh Subhraveti dineshs@altiscale.com (github: dineshs-altiscale) and so he deserves a ton of credit.

Docker-DCO-1.1-Signed-off-by: Timothy <timothyhobbs@seznam.cz> (github: timthelion)
2014-07-10 10:35:53 -07:00
unclejack
840ed5ace2 Merge pull request #6939 from snitm/thinp-blocksize-fix
devmapper: revert the default dm-thin-pool blocksize back to 64K
2014-07-10 19:57:07 +03:00
Bryan Bess
1df4049e17 Fix typos
Docker-DCO-1.1-Signed-off-by: Bryan Bess <squarejaw@bsbess.com> (github: squarejaw)
2014-07-09 23:14:06 -05:00
Mike Snitzer
d715803d45 devmapper: revert the default dm-thin-pool blocksize back to 64K
Commit 09ee269d ("devmapper: Add option for specifying the thin pool
blocksize") also switched the default dm-thin-pool blocksize from 64K to
512K.  That change unfortunately breaks the activation of dm-thin-pool
devices that were previously created using a 64K blocksize.  Here is an
example of the dm-thin-pool activation failure users may experience:

 device-mapper: thin: 253:4: pool target (204800 blocks) too small: expected 1638400
 device-mapper: table: 253:4: thin-pool: preresume failed, error = -22

The reason for this is docker is passing 512K as the blocksize for a
dm-thin-pool that was previously created using a 64K blocksize.  Docker
doesn't record the blocksize the is used when it creates a dm-thin-pool.
Until now it never had a need to do so because the blocksize was always
hardcoded.  The dm-thin-pool blocksize must be the same every time a
dm-thin-pool is activated.

As a stop-gap fix, revert to using 64K for the default blocksize.

But we do need a proper fix for this now that 'dm.blocksize' is exposed
as a proper storage option.  One possible fix would be to record the
blocksize for each dm-thin-pool that docker creates and to pass that
recorded blocksize down in the dmsetup table load each time the
dm-thin-pool is activated (this would be comparable to what lvm2 does).

Docker-DCO-1.1-Signed-off-by: Mike Snitzer <snitzer@redhat.com> (github: snitm)
2014-07-09 16:47:30 -04:00
Solomon Hykes
2d34a08c48 Merge pull request #6570 from cpuguy83/add_cpuguy83_as_volumes_maintainer
Add cpuguy83 as volumes maintainer
2014-07-09 02:12:14 -07:00
Michael Crosby
f021cd64ed Merge pull request #6636 from saaadhu/master
Fix typo in README.md
2014-07-08 16:35:26 -07:00
Michael Crosby
3993f9d581 Merge pull request #6799 from LK4D4/refactor_portallocator
Refactoring portallocator
2014-07-07 12:39:36 -07:00
Michael Crosby
bade039bda Merge pull request #6821 from LK4D4/broadcast_writer_refactor
Broadcast writer refactor
2014-07-07 12:15:47 -07:00
Michael Crosby
219a3345de Merge pull request #6452 from mheon/selinux_btrfs_fix
Error if Docker daemon starts with BTRFS graph driver and SELinux enabled
2014-07-07 11:34:50 -07:00
unclejack
2e4f99d99c Merge pull request #6645 from snitm/dmthinp-devel
Dmthinp devel
2014-07-07 21:20:31 +03:00
Michael Crosby
bcec0f30e8 Merge pull request #6371 from jpetazzo/6370-masquerade
Select masquerade by outgoing interface rather than by destination subne...
2014-07-07 10:28:31 -07:00
unclejack
e2c575c5a6 Merge pull request #6756 from kzys/lxc-linux
Skip lxc_template_unit_test.go on non-Linux platforms
2014-07-07 18:46:46 +03:00
Matthew Heon
4318802f64 Error if Docker daemon starts with BTRFS graph driver and SELinux enabled
The Docker btrfs graph driver does not interact well with SELinux at present.
If btrfs mounts the same file in several locations, the same SELinux label will
be applied to all mountpoints. In the context of the graph driver, things such
as shared libraries become inaccessible to containers due to SELInux, causing
all dynamically linked applications to fail when run in a container.

Consequently, error when we detect the daemon is being run with SELinux enabled
and the btrfs driver. Documentation has been added for this behavior.

Docker-DCO-1.1-Signed-off-by: Matthew Heon <mheon@redhat.com> (github: mheon)
2014-07-03 08:11:18 -04:00
LK4D4
7bdd23bfee BroadcastWriter refactoring
It became slightly faster and lighter
possibly fixes #5923 problems

Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
2014-07-03 10:12:53 +04:00
SvenDowideit
fa29b1f062 I'm going to wish I didn't do this
Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
2014-07-03 10:31:56 +10:00
LK4D4
9d4e802221 Move WriteBroadcaster to separate package as BroadcastWriter
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
2014-07-02 23:31:06 +04:00
Victor Vieux
d403936818 fix compilation and panic
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-07-02 00:54:08 +00:00
Tibor Vass
cccb64e863 Add backwards READ compatibility for the old libcontainer API
Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
2014-07-02 00:19:05 +00:00
LK4D4
f387cc1205 Refactoring portallocator
Faster, more documented, less code.
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
2014-07-01 21:59:11 +04:00
Victor Vieux
cdc62c778f Merge pull request #6787 from vieux/pause_commit2
Pause/freeze containers during commit
2014-07-01 10:11:18 -07:00
Eric Windisch
17d870bed5 Pause/freeze containers during commit
Initiates a pause before committing a container,
adds a pause option to the commit command, defaulting to 'true'.

Fixes bug: #6267
Fixes bug: #3675

Docker-DCO-1.1-Signed-off-by: Eric Windisch <ewindisch@docker.com> (github: ewindisch)
2014-07-01 00:30:21 +00:00
Tibor Vass
262d45e0fe Use new libcontainer.State API
Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
2014-06-30 18:27:15 -04:00
Tibor Vass
fef1e0a708 Merge pull request #6682 from erikh/6476-persistent_port_allocation
fix persistent port allocation
2014-06-30 10:14:17 -04:00