1
0
mirror of https://github.com/docker/cli.git synced 2026-01-23 15:21:32 +03:00
Commit Graph

5871 Commits

Author SHA1 Message Date
Alexander Larsson
79ab6381a5 Implement container.ExportRW() on device-mapper
Upstream-commit: b0626f403b168b9020a802ec3bc4ad8c9bbc2486
Component: engine
2013-09-30 17:34:59 -06:00
Alexander Larsson
06dfc21edb 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.
Upstream-commit: fda6ff9c2707efbd1c9d1f2bf151b9d1d082d0c6
Component: engine
2013-09-30 17:34:59 -06:00
Alexander Larsson
53e75b5d60 Archive: Fix up tar commandline arguments in TarFilter()
There is no need to duplicate the compression flags for
every element in the filter.
Upstream-commit: b86f67126c86a07aac155f38aefd6c1ef538e24d
Component: engine
2013-09-30 17:34:59 -06:00
Alexander Larsson
534a030a97 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.
Upstream-commit: 1c5dc26a7c0a0abb7bc59174768ec309f6c5fd4f
Component: engine
2013-09-30 17:34:59 -06:00
Alexander Larsson
8fb407ad51 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.
Upstream-commit: 8e7cbbff504b1d5b0680d2a14821d1d7b0757ab0
Component: engine
2013-09-30 17:34:59 -06:00
Alexander Larsson
11ba6503a7 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
Upstream-commit: 074f38d49377411cf0b805095c0d9909d4859f3c
Component: engine
2013-09-30 17:34:59 -06:00
Alexander Larsson
0134fab2c6 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.
Upstream-commit: a9ec1dbc9bec91e1c0f1b751a06680570a04e915
Component: engine
2013-09-30 17:34:59 -06:00
Alexander Larsson
f4fd5894a2 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
Upstream-commit: d2ba3e200576c2bcceb81d8d3d65b86fbf49313b
Component: engine
2013-09-30 17:34:59 -06:00
Alexander Larsson
03b4e52ca7 Runtime: Add MountMethod to allow AUFS and device-mapper to coexist
Upstream-commit: 8f7361279c13660a617886a523c50ecbc6849129
Component: engine
2013-09-30 17:34:59 -06:00
Alexander Larsson
4f27979b41 Runtime: Add DeviceSet singleton
This adds a DeviceSet singleton to the Runtime object which will be used for
any DeviceMapper dependent code.
Upstream-commit: ca2f7f955e697091f2b7bee9a33c6c4e106cecd0
Component: engine
2013-09-30 17:34:59 -06:00
Alexander Larsson
6c1aee42e6 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
Upstream-commit: 1d36b8c7b7b0c943ccb7d69b7181b3e33566d77c
Component: engine
2013-09-30 17:34:59 -06:00
Alexander Larsson
acf340a68b 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.
Upstream-commit: e6216793d91a9b003814b535b0373902326753dd
Component: engine
2013-09-30 17:34:58 -06:00
Alexander Larsson
3b80b99ef6 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
Upstream-commit: e368c8bb01b3c52c8e4c334c3a7f32556af9d632
Component: engine
2013-09-30 17:34:58 -06:00
Alexander Larsson
b25a04bd5f 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.
Upstream-commit: 167601e85850aa58df96f9d0796f9c26ed2d6fa4
Component: engine
2013-09-30 17:34:58 -06:00
Alexander Larsson
3681b7af0d Add a separate docker-init binary
This may be used for the .dockerinit case if the main binary is not
statically linked.
Upstream-commit: b8dc7b5f1a8111275e2b869dfb67a8689cecf9b9
Component: engine
2013-09-30 17:34:58 -06:00
Alexander Larsson
0553a0af33 devmapper: Add simple tool to test the DeviceSet commands
Upstream-commit: 7fb3bfed03d4d2a88f0e76fd6b8425cc753f4547
Component: engine
2013-09-30 17:34:58 -06:00
Alexander Larsson
bf4813911d 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
Upstream-commit: 374a5e9913112c5bde590e532bc0ba5e4afeda49
Component: engine
2013-09-30 17:34:58 -06:00
Alexander Larsson
cdec248ebe Add libdevmapper wrapper
Upstream-commit: 459bac712709db4d188022539f4d59524b4b3670
Component: engine
2013-09-30 17:34:58 -06:00
Solomon Hykes
98a0159ef9 Merge pull request #1994 from metalivedev/1993-legalcontext
Fix #1993: add explanation for export restrictions
Upstream-commit: 23015fa14dd3f58e582d7ef3039262025b06f21c
Component: engine
2013-09-30 16:33:46 -07:00
Thermionix
d8c814f4ca Update archlinux.rst
Upstream-commit: fb46d911c204ddda381325c5f1e43277b7b231c2
Component: engine
2013-10-01 09:33:12 +10:00
Tianon Gravi
61073fc069 Merge pull request #2051 from tianon/hack-dockerfile-refactor
Add cleanup/refactor portion of #2010 for hack and Dockerfile updates
Upstream-commit: 85b776995cfcd02a8b0f6f07f6b5f57238363e83
Component: engine
2013-09-30 16:29:32 -07:00
Thatcher
c186883e60 Merge pull request #2035 from dhrp/style-revamp
Changes to a new style for the docs. Includes version switcher.
Upstream-commit: fa44555fb44f370ac01a1c26da3d5c1927833335
Component: engine
2013-09-30 15:51:43 -07:00
Andy Rothfusz
bd97f4052d Merge pull request #2033 from metalivedev/1969-cherrypick-fixcommitformat
Fix #1969 formatting, add information about multiline json
Upstream-commit: 3e7c50e8a17c66cbb45895235c7d9d38beafc200
Component: engine
2013-09-30 14:55:11 -07:00
Tianon Gravi
33aa0c2b85 Add cleanup/refactor portion of #2010 for hack and Dockerfile updates
Upstream-commit: ccefe47897bdcef8b56bf54d4bd324989855f3b5
Component: engine
2013-09-30 13:57:30 -06:00
Tianon Gravi
cf42215112 Merge pull request #2039 from tianon/mkimage-centos
Add contrib/mkimage-centos.sh back (from #1621), and associated documentation link
Upstream-commit: ff850319803a4c5910ec0a5a34134bf4af99d58e
Component: engine
2013-09-30 10:51:06 -07:00
Guillaume J. Charmes
3d2cd4cd2d Merge pull request #2046 from dotcloud/2030-dockercfg_panic_err-fix
- Runtime: fix panic with wrong dockercfg file
Upstream-commit: 017ecefd66cbf538e0b17a3f74ece05f92473c0f
Component: engine
2013-09-30 10:02:12 -07:00
Thermionix
7bb18042ef Update archlinux.rst
The /etc/sysctl.conf file is deprecated
https://www.archlinux.org/news/deprecation-of-etcsysctlconf/
Upstream-commit: 88f710f0e79eafe469e09a3ea990bdbe0c7d0a52
Component: engine
2013-09-30 22:44:09 +10:00
Victor Vieux
bc13d7f295 fix panic with wrong dockercfg file
Upstream-commit: 649605915428e0ee81cf49d15e949d48da20110c
Component: engine
2013-09-30 11:07:32 +00:00
Victor Vieux
4664dde409 Merge pull request #1995 from dotcloud/fix_attach_2
Fix the attach behavior with -i
Upstream-commit: bcce3cbdd1cb4d79272c0cbfa43ef0847be1b9d9
Component: engine
2013-09-30 03:29:19 -07:00
Victor Vieux
cc91061a09 Merge pull request #2025 from dotcloud/2020_add_dockercfg_doc
add .dockercfg doc
Upstream-commit: bbf644ed62cf815cf40ef3de3345fac7ed42588a
Component: engine
2013-09-30 03:21:46 -07:00
Tianon Gravi
bda4d2512b Add contrib/mkimage-centos.sh back (from #1621), and associated documentation link
Upstream-commit: d89ce09a76e7934338d4966d05f6b67618c8bfb0
Component: engine
2013-09-28 07:54:34 -06:00
Thatcher Peskens
17c973c7fe Changes to a new style for the docs. Includes version switcher.
* added link to edit on GitHub
* Changed image source on homepage
* Made some changes to the structure, added the ability to have l3 navigation. Added warning, note and other styles.
* Fixed an image link, removed the .. :content: links because they were quicky and didn't look good, added pagelinks to current page of other versions.
* Moved the remote client api's to their own doc
Upstream-commit: e3e041b6bf0066fa5e65625694517ff387fee3b1
Component: engine
2013-09-27 19:54:52 -07:00
Andy Rothfusz
ac095d59b4 Added more context.
Upstream-commit: 0a35b1fb3681561a1f3f139d989c0bd133122123
Component: engine
2013-09-27 19:07:12 -07:00
Andy Rothfusz
467ddfdf0c Merge pull request #2034 from metalivedev/1969-cherrypick-fixcommitformat
Fix #1969 formatting, add information about multiline json
Upstream-commit: 3894add8a972aa2f2aeb2a2b8e686efd03039530
Component: engine
2013-09-27 18:19:55 -07:00
Andy Rothfusz
024f3a4096 Fix #1969 formatting, add information about multiline json
Upstream-commit: 74d54b9b2eec8f92d688b7d53e813ebe931e4114
Component: engine
2013-09-27 18:16:00 -07:00
Michael Crosby
d19bad0dec Merge pull request #2032 from dotcloud/move-rm-to-client
Move run -rm to the cli only
Upstream-commit: 31fd11860b871ef9504a3d9d4c339e872cfa1822
Component: engine
2013-09-27 17:19:01 -07:00
Daniel Mizyrycki
6991928d6e Merge pull request #2006 from jo-m/master
Enable SSH Agent forwarding in Vagrant VM
Upstream-commit: b081a740b3073816e8a00bd6a2070690a475ade7
Component: engine
2013-09-27 12:07:44 -07:00
Michael Crosby
3724fa4a50 Merge pull request #1589 from unclejack/479-add_rm_support_to_docker_run
Add -rm to docker run for removing a container on exit
Upstream-commit: db869ecce57baa71f8b5eccf5fb769c3c6796438
Component: engine
2013-09-27 11:45:32 -07:00
Guillaume J. Charmes
54929011c2 Fix the attach behavior with -i
Upstream-commit: 537149829accde869430924cf988f64cfbd16f99
Component: engine
2013-09-27 11:10:55 -07:00
Andy Rothfusz
d4572af49a Merge pull request #2009 from kyleconroy/master
Improve registry and index REST API documentation
Upstream-commit: ba10e289275e6e7feed851f439e8ac90078bf50f
Component: engine
2013-09-27 10:56:21 -07:00
Victor Vieux
e40fd9a21b add .dockercfg doc
Upstream-commit: f4855a7cf00cc96cfffc5cb704b3b2493fe3601e
Component: engine
2013-09-27 18:19:17 +02:00
unclejack
5bcfc0bffe automatically remove container via -rm
add AutoRemove to HostConfig
add -rm flag to docker run
add TestRunAutoRemove to test -rm
docs: add -rm to commandline/command/run
add hostConfig to container monitor
make monitor destroy the container via -rm

This adds support for automatically removing a container after it
exits. The removal of the container is handled on the server side.
Upstream-commit: 22e7e107addc4703ee6ef36981dfafe985be695d
Component: engine
2013-09-27 17:43:12 +03:00
Colin Dunklau
c1d534a826 Clearly point at detailed docs
Upstream-commit: edd90d46c778d28e4cf2d68a504218698a1e1e61
Component: engine
2013-09-27 08:32:55 -05:00
Victor Vieux
54d02ef8f4 Merge pull request #2023 from alexlarsson/old_kernel
Image: Fix time setting for old kernels
Upstream-commit: 514886c73dd6626799564e6309177ea8045324bf
Component: engine
2013-09-27 05:25:13 -07:00
Guillaume J. Charmes
f9de2ea5c3 Merge pull request #1842 from dotcloud/split_stdout_stderr
* Runtime: Split stdout stderr
Upstream-commit: f435970695e896ae8532cd0850700ae56d0b0516
Component: engine
2013-09-26 18:05:24 -07:00
Guillaume J. Charmes
c6a1c7cdae Update docs + fix endian issue
Upstream-commit: cb18a6e1b934b7f5c63f8931ee8fe51e2789c597
Component: engine
2013-09-26 17:36:21 -07:00
Alexander Larsson
05ac257fe9 Image: Fix time setting for old kernels
This is a better fix for futimes() on kernels not supporting O_PATH.
The previous fix broke when copying a device, as it tried to open it
and got and error.
Upstream-commit: 75e958bf48a83de5f3f80859aee96f3356d16d4b
Component: engine
2013-09-26 23:59:37 +02:00
Kyle Conroy
6cfd549810 Fix copypasta errors
Upstream-commit: ce05083d4bd78a8c8272742095cf662fa86739ef
Component: engine
2013-09-26 14:57:02 -07:00
Michael Crosby
5ead415a2c Move run -rm to the cli only
Upstream-commit: 723de8768145cb47fdb6af399043f9313ad29cdb
Component: engine
2013-09-26 14:52:37 -07:00
David Sissitka
6693d06bc7 Used tabs for alignment when I should've used spaces. Fixed.
Upstream-commit: c22e377a6d36816210803e34e4d73cf45a4aa828
Component: engine
2013-09-26 13:56:59 -07:00