1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

3415 commits

Author SHA1 Message Date
Alexander Larsson
94fa3c7bb5 Implement container.ExportRW() on device-mapper 2013-09-26 15:08:55 +00:00
Alexander Larsson
223280f319 Make TarFilter more useful
There are a few changes:
* Callers can specify if they want recursive behaviour or not
* All file listings to tar are sent on stdin, to handle long lists better
* We can pass in a list of filenames which will be created as empty
  files in the tarball

This is exactly what we want for the creation of layer tarballs given
a container fs, a set of files to add and a set of whiteout files to create.
2013-09-26 15:08:55 +00:00
Alexander Larsson
8f23945f7f Archive: Fix up tar commandline arguments in TarFilter()
There is no need to duplicate the compression flags for
every element in the filter.
2013-09-26 15:08:55 +00:00
Alexander Larsson
8e8ef7cb5b Implement docker diff for device-mapper
To do diffing we just compare file metadata, so this relies
on things like size and mtime/ctime to catch any changes.
Its *possible* to trick this by updating a file without
changing the size and setting back the mtime/ctime, but
that seems pretty unlikely to happen in reality, and lets
us avoid comparing the actual file data.
2013-09-26 15:08:55 +00:00
Alexander Larsson
8f343ea65a devmapper: Base the device-mapper names on the root dir name
This means the default is "docker-*", but for tests we get separate
prefixes for each test.
2013-09-26 15:08:55 +00:00
Alexander Larsson
b125f2334c Image: Always create a .docker-id file in the devices we create
Without this there is really no way to map back from the device-mapper
devices to the actual docker image/container ids in case the json file
somehow got lost
2013-09-26 15:08:55 +00:00
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
Andy Rothfusz
06c1f000e8 Merge pull request 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 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 from kencochrane/master
fix the error message so it is the same as the regex issue 
2013-09-25 09:46:15 -07:00
Ken Cochrane
0f829bf5cf fix the error message so it is the same as the regex issue 2013-09-25 11:33:09 -04:00
Victor Vieux
1363de0934 Merge pull request 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 from tianon/hack-build-instructions
* Hack: Add several of the small make.sh fixes from , and make the output more consistent and contributor-friendly
2013-09-24 17:38:39 -07:00
Andy Rothfusz
b048e9dffc Merge pull request 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 , 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 from dotcloud/bump_0.6.3
Bump to version v0.6.3
2013-09-24 11:20:27 -07:00
Solomon Hykes
03fe5632d0 Merge pull request from dotcloud/cleanup-hack
Cleanup and reorganize docs and tooling for contributors and maintainers
2013-09-24 10:38:21 -07:00
Victor Vieux
7447867edd Merge pull request 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 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  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 from metalivedev/1969-formatfix
Fix  formatting, add information about multiline json
2013-09-23 13:17:55 -07:00
Michael Crosby
35ca35ffb6 Merge pull request 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 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