Commit Graph

3720 Commits

Author SHA1 Message Date
Alexander Larsson a89a51128e Image: Deactivate image device when unmounting container
There is no need to keep all the device-mapper devices active, we
can just activate them on demand if needed.
2013-09-26 15:08:54 +00:00
Alexander Larsson fcd41fe51a Image: Initial support for device-mapper mounts
This supports creating images from layers and mounting them
for running a container.

Not supported yet are:
* Creating diffs between images/containers
* Creating layers for new images from a device-mapper container
2013-09-26 15:08:54 +00:00
Alexander Larsson 53851474c0 Runtime: Add MountMethod to allow AUFS and device-mapper to coexist 2013-09-26 15:08:54 +00:00
Alexander Larsson f317a6b6fe Runtime: Add DeviceSet singleton
This adds a DeviceSet singleton to the Runtime object which will be used for
any DeviceMapper dependent code.
2013-09-26 15:08:54 +00:00
Alexander Larsson 87e248f524 Server: Pass in device-mapper DeviceSet to server
This makes docker (but not docker-init) link to libdevmapper and will
allow it to use the DeviceSet
2013-09-26 15:08:54 +00:00
Alexander Larsson ac194fc696 Add DeviceSet interface
This interface matches the device-mapper implementation (DeviceSetDM)
but is free from any dependencies. This allows core docker code
to refer to a DeviceSet without having an explicit dependency on
the devmapper package.

This is important, because the devmapper package has external
dependencies which are not wanted in the docker client app, as it
needs to run with minimal dependencies in the docker image.
2013-09-26 15:08:54 +00:00
Alexander Larsson 8637ba710e Image: Add runtime and container id args to Mount()
We will later need the runtime to get access to the VolumeSet
singleton, and the container id to have a name for the volume
for the container
2013-09-26 15:08:54 +00:00
Alexander Larsson 0f5ccf934e Runtime: Automatically use docker-init if it exists
In some builds the main docker binary is not statically linked,
and as such not usable in as the .dockerinit binary, for those
cases we look for a separately shipped docker-init binary and
use that instead.
2013-09-26 15:08:54 +00:00
Alexander Larsson 250bc3f615 Add a separate docker-init binary
This may be used for the .dockerinit case if the main binary is not
statically linked.
2013-09-26 15:08:54 +00:00
Alexander Larsson 2b1dc8a8a3 devmapper: Add simple tool to test the DeviceSet commands 2013-09-26 15:08:54 +00:00
Alexander Larsson 0b12702c0c devmapper: Add DeviceSet device-mapper helper
This is a module that uses the device-mapper create CoW snapshots
You instantiate a DeviceSetDM object on a specified root (/var/lib/docker),
and it will create a subdirectory there called "loopback". It will
contain two sparse files which are loopback mounted into
a thin-pool device-mapper device called "docker-pool".

We then create a base snapshot in the pool with an empty filesystem
which can be used as a base for docker snapshots. It also keeps track
of the mapping between docker image ids and the snapshots in the pool.

Typical use of is something like (without error checking):

devices = NewDeviceSetDM("/var/lib/docker")
devices.AddDevice(imageId, "") // "" is the base image id
devices.MountDevice(imageId, "/mnt/image")
 ... extract base image to /mnt/image
devices.AddDevice(containerId, imageId)
devices.MountDevice(containerId, "/mnt/container")
... start container at /mnt/container
2013-09-26 15:08:54 +00:00
Alexander Larsson 739af0a17f Add libdevmapper wrapper 2013-09-26 15:08:54 +00:00
Kyle Conroy 818ec10da3 Fix Authorization headers 2013-09-26 01:19:49 -07:00
Kyle Conroy 34e28ccc88 Remove smart quotes. Add the X-Docker-Token header
Also fix the /layer endpoint, which had incorrect information
2013-09-26 01:15:36 -07:00
Kyle Conroy 792403f2dc Add the X-Docker-Registry header and /v1/_ping endpoint 2013-09-26 00:16:15 -07:00
Jonathan Mueller 8f5c33dc1f Enable SSH Agent forwarding in Vagrant VM, so one is able to clone repos from private git repos etc. 2013-09-25 22:57:04 +02:00
Andy Rothfusz 06c1f000e8 Merge pull request #2000 from tianon/deprecated-docker-latest-tgz
Replace deprecated upgrading reference to docker-latest.tgz, which hasn't been updated since 0.5.3
2013-09-25 13:47:48 -07:00
Andy Rothfusz 00b3acb8ab Merge pull request #2001 from tianon/gentoo-tree
Update Gentoo installation documentation now that we're in the portage tree proper
2013-09-25 13:45:51 -07:00
Victor Vieux 420ba9c85a Merge pull request #2004 from kencochrane/master
fix the error message so it is the same as the regex issue #1999
2013-09-25 09:46:15 -07:00
Ken Cochrane 0f829bf5cf fix the error message so it is the same as the regex issue #1999 2013-09-25 11:33:09 -04:00
Victor Vieux 1363de0934 Merge pull request #1989 from alexlarsson/setsid
Container: Always create a new session for the container
2013-09-25 07:40:51 -07:00
Tianon Gravi d06116d2e8 Update Gentoo installation documentation now that we're in the portage tree proper
We're officially a first-class Gentoo citizen now, which is very exciting.  Many thanks to @gregkh for helping us get here.

I started just adapting sections of language in this document, and realized several bits needed to just be rewritten entirely to be more clear.
2013-09-24 23:26:36 -06:00
Tianon Gravi 595210a370 Replace deprecated upgrading reference to docker-latest.tgz, which hasn't been updated since 0.5.3 2013-09-24 21:25:45 -06:00
Michael Crosby c9b916b293 Update VERSION to 0.6.3-dev 2013-09-24 19:54:13 -07:00
Michael Crosby 1e6370fd4b Merge branch 'release' 2013-09-24 19:54:06 -07:00
Solomon Hykes a59a66528b Merge pull request #1968 from tianon/hack-build-instructions
* Hack: Add several of the small make.sh fixes from #1920, and make the output more consistent and contributor-friendly
2013-09-24 17:38:39 -07:00
Andy Rothfusz b048e9dffc Merge pull request #1983 from blissdev/patch-1
various command fixes in postgres example
2013-09-24 14:03:48 -07:00
blissdev c000e6a7fc revert removal of slash betwixt user/repo 2013-09-24 15:51:21 -05:00
Tianon Gravi aa3de0b849 Add several of the small make.sh fixes from #1920, and make the output more consistent and contributor-friendly, since release instructions already exist in release.sh 2013-09-24 14:36:20 -06:00
Michael Crosby 648d759517 Merge pull request #1972 from dotcloud/bump_0.6.3
Bump to version v0.6.3
2013-09-24 11:20:27 -07:00
Andy Rothfusz 5c190fa926 Fix #1993: add explanation for export restrictions 2013-09-24 11:04:08 -07:00
Solomon Hykes 03fe5632d0 Merge pull request #1970 from dotcloud/cleanup-hack
Cleanup and reorganize docs and tooling for contributors and maintainers
2013-09-24 10:38:21 -07:00
Dan Buch edde4f55e0 Adding more tests around `auth.ResolveAuthConfig`
mostly because I've been failing at getting docker `0.6.2` working with
docker-registry `0.6.0` with regard to login and push.  I suspect there
may be some mismatched expectations between `auth.ResolveAuthConfig` and
`registry.ResolveRepositoryName`, but I haven't done enough research or
experimentation to think it's anything more than user error.  More tests
are good, no?
2013-09-24 12:36:50 -04:00
Victor Vieux 7447867edd Merge pull request #1982 from modcloth-labs/spelling-fix-for-the-word-protocol
Minor spelling correction of protocoll -> protocol
2013-09-24 07:40:21 -07:00
Alexander Larsson c1c74cb0b1 Container: Always create a new session for the container
We never want the container to be in the same process group as the
daemon, as then the container will receive signals sent to the
process group of the container.
2013-09-24 14:57:29 +02:00
blissdev 17b7194d91 use su instead of sudo 2013-09-24 02:25:16 -05:00
Jordan Arentsen 15ad2915b9 various command fixes
Indicating the repository and tag should be separated by a space and not a '/'. Also fixed a quote typo.
2013-09-24 02:12:24 -05:00
Tianon Gravi d6887b769c Merge pull request #1883 from tianon/mkimage-debian
Several small tweaks/fixes for contrib/mkimage-debian.sh
2013-09-23 22:44:16 -07:00
Tianon Gravi 10362870db Add a few tweaks and fixes to contrib/mkimage-debian.sh
Add simple workaround for #1755 to contrib/mkimage-debian.sh

Add simple echo patch in contrib/mkimage-debian.sh to prevent init scripts from running during apt-get installs/updates

Add `apt-get clean` to mkimage-debian.sh for slightly smaller images

Add more small apt tweaks to mkimage-debian.sh thanks to @jpetazzo and @spahl
2013-09-23 22:39:57 -06:00
Dan Buch a7db125480 Minor spelling correction of protocoll -> protocol 2013-09-23 23:14:42 -04:00
Solomon Hykes f6c64827c8 Hack: correct typo in release checklist 2013-09-23 18:43:08 -07:00
Andy Rothfusz 30b759ffa9 Merge pull request #1973 from metalivedev/1969-formatfix
Fix #1969 formatting, add information about multiline json
2013-09-23 13:17:55 -07:00
Michael Crosby 35ca35ffb6 Merge pull request #1975 from tianon/patch-1
Add @tianon to hack/MAINTAINERS
2013-09-23 12:21:36 -07:00
Tianon Gravi a4067b1b44 Add @tianon to hack/MAINTAINERS 2013-09-23 12:39:14 -06:00
Michael Crosby b0a49a30c7 Bump to version v0.6.3 2013-09-23 11:29:11 -07:00
Andy Rothfusz 6097644e4b Fix #1969 formatting, add information about multiline json 2013-09-23 11:29:08 -07:00
Solomon Hykes fa3837abf1 Hack: update README 2013-09-23 11:26:05 -07:00
Solomon Hykes baff72bc82 Update maintainer's manual: every change should be done in a pull request. 2013-09-23 11:26:05 -07:00
Solomon Hykes 99377de7d2 Hack: update release checklist and reference it in REAMDE 2013-09-23 11:26:04 -07:00
Solomon Hykes 0ef5bcb17d hack/MAINTAINERS.md: a maintainer's manual. 2013-09-23 11:26:04 -07:00