Commit Graph

54 Commits

Author SHA1 Message Date
4092cbb7ff Pull all image aliases for id. Closes #8141.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 7d74be162c9704df848c865a9b4bcd4047da9124
Component: engine
2014-09-25 11:48:49 -07:00
f4fc3cbb97 if the Rename during an image delete fails, just delete the original dir
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 86a3a9a2822e5473816d5ced945b37fcc2131e1e
Component: engine
2014-09-22 18:47:20 -07:00
861f46b221 Refactor use of graphdriver.Differ
Some graphdrivers are Differs and type assertions are made
in various places throughout the project. Differ offers some
convenience in generating/applying diffs of filesystem layers
but for most graphdrivers another code path is taken.

This patch brings all of the logic related to filesystem
diffs in one place, and simplifies the implementation of some
common types like Image, Daemon, and Container.

Signed-off-by: Josh Hawn <josh.hawn@docker.com>
Upstream-commit: dee6b481fe0da1d845261ffff2e610fb05898d3c
Component: engine
2014-09-16 15:10:32 -07:00
fc234a85d7 graph: validate tags properly & add unit tests
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: ada883b198aa5e7a42d344174dcec04933c6fb2a
Component: engine
2014-09-16 00:13:54 +03:00
d6e3f1dab9 Merge pull request #7996 from estesp/7943-validate-tagnames
Validate tag names similar to repository name validation; add tests
Upstream-commit: 98e409172cb5872e0b081244bf8802e4a422d735
Component: engine
2014-09-11 15:19:50 -07:00
31470054b1 Validate tag names similar to repository name validation; add tests
Addresses #7943

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 46eb4140c915e05a893080b34b42e25b6a75de7b
Component: engine
2014-09-11 17:52:36 -04:00
0b07be83cc Add daemon flag to specify public registry mirrors
Adds support for a --registry-mirror=scheme://<host>[:port]
daemon flag. The flag may be present multiple times. If
provided, mirrors are prepended to the list of endpoints used
for image pull. Note that only mirrors of the public
index.docker.io registry are supported, and image/tag resolution
is still performed via the official index.

Docker-DCO-1.1-Signed-off-by: Tim Smith <timbot@google.com> (github: timbot)
Upstream-commit: 69a75c673ccf0aebf19c7b350243f1b0cefad8be
Component: engine
2014-09-09 19:03:38 +00:00
cc2787ae0d Some more style fixes
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Upstream-commit: 114838cbda38f4808d3a7a0d40b33d2ee445d158
Component: engine
2014-08-29 15:21:28 +04:00
4d890308d7 docker save: ability to save multiple images
Now from a single invocation of `docker save`, you can specify multiple
images to include in the output tar, or even just multiple tags of a
particular image/repo.

```
> docker save -o bundle.tar busybox ubuntu:lucid ubuntu:saucy fedora:latest
> tar tf ./bundle.tar | wc -l
42
> tar xOf ./bundle.tar repositories
{"busybox":{"latest":"2d8e5b282c81244037eb15b2068e1c46319c1a42b80493acb128da24b2090739"},"fedora":{"latest":"58394af373423902a1b97f209a31e3777932d9321ef10e64feaaa7b4df609cf9"},"ubuntu":{"lucid":"9cc9ea5ea540116b89e41898dd30858107c1175260fb7ff50322b34704092232","saucy":"9f676bd305a43a931a8d98b13e5840ffbebcd908370765373315926024c7c35e"}}
```

Further, this fixes the bug where the `repositories` file is not created
when saving a specific tag of an image (e.g. ubuntu:latest)

document multi-image save and updated API docs

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: e64131d1bf7c79358d5ee7a1a98626730db3593b
Component: engine
2014-08-28 20:22:33 -04:00
58c4d9bd7f graph: remove obsolete comments
Graph.Get function already returns nil when the image doesn't exist so
following comment is obsolete.
FIXME: return nil when the image doesn't exist, instead of an error

Signed-off-by: Daehyeok.Mun <daehyeok@gmail.com>
Upstream-commit: 59d58352dfb66a12000d4b65f6c337c7936326e3
Component: engine
2014-08-29 00:22:26 +09:00
245b05f4a2 graph: change argument order of Register function
This commit is patch for following comment
FIXME: pass img as first argument

Signed-off-by: Daehyeok.Mun <daehyeok@gmail.com>
Upstream-commit: 35df24c8e6195ebac6ea28ed4dda5b53b1021f38
Component: engine
2014-08-28 20:06:07 +09:00
9df494bb71 another commit to do like @crosbymichael
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: a0392324f194f4f92e3205f0c0ed8b71dc2fc93f
Component: engine
2014-08-14 01:36:26 +00:00
4737f7cea5 Extract log utils into pkg/log
Docker-DCO-1.1-Signed-off-by: Josiah Kiehl <josiah@capoferro.net> (github: capoferro)
Upstream-commit: a02f67be5b17da63d475e6f35956c1e72c3b2e7b
Component: engine
2014-08-13 15:18:15 -07:00
955bae5653 registry.Registry -> registry.Session
renaming this struct to more clearly be session, as that is what it
handles.

Splitting out files for easier readability.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 752dd707ac09cdcd88307b28aa9e39ac7c763b44
Component: engine
2014-08-13 09:27:43 -04:00
4b0847a35d Merge pull request #6301 from rail44/feature-load-only-not-exist-image
Use only unavailable image when load from Tarball
Upstream-commit: f4f1e4db708193edeea996c46bd8ff6e434e9eba
Component: engine
2014-08-11 11:28:52 +03:00
d6d8f8ffe0 Use only unavailable image when load from Tarball
Docker-DCO-1.1-Signed-off-by: Satoshi Amemiya <satoshi_amemiya@voyagegroup.com> (github: rail44)
Upstream-commit: a34dd216119bd343eb4a1f68ad209816d7a3f4c9
Component: engine
2014-08-08 20:30:38 +09:00
1e2878c9bb Move "pull" and "push" to graph/pull.go and graph/push.go
This is part of the ongoing effort to remove the deprecated server/
package, and generally cleanup and simplify the codebase.

Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: 6856a6b110caa463a06cae456fc53e93c6adf9d1
Component: engine
2014-08-08 07:25:09 +00:00
c29fd30ad7 Merge pull request #7453 from shykes/new-subsystem-maintainers
Add maintainers to daemon/ and graph/
Upstream-commit: 5d9cfde0df1453ccc66c98cabe42dd640fdb79c2
Component: engine
2014-08-07 16:43:41 -07:00
c3b263a99f Add maintainers to daemon/ and graph/
Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: 5240e5f71380b68792abcd3cf54283385ec7a4f0
Component: engine
2014-08-06 10:29:15 +00:00
3c48cb561a Check error returned by eng.Register() in TagStore.Install()
Signed-off-by: Tibor Vass <teabee89@gmail.com>
Upstream-commit: af0781974df54f2c4959ea1d90c3f43b9ae37799
Component: engine
2014-08-06 17:19:01 -04:00
7b8c4dce89 Move "image_tag" and "tag" to graph/tag.go
Note: these 2 jobs should be merged into one. This was noted in a FIXME.

Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: d7879379571e778b30973874df22fed3266cbb8f
Component: engine
2014-08-06 17:18:51 -04:00
93595da0a6 Move "import" to graph/import.go
Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: fa27580cff5f22bcf2a4860b5582c67d275a0e11
Component: engine
2014-08-06 17:18:50 -04:00
ffef9dad57 Move "load" to graph/load.go
Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: f2029f7be19c75ccc291608d1bd07bc0de220276
Component: engine
2014-08-06 17:18:50 -04:00
879d15c342 Move "viz" to graph/viz.go
Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: 77781440f13b07caa19c835523cbc6591dc1ffa8
Component: engine
2014-08-06 17:18:50 -04:00
b81d1a3561 Move "images" to graph/list.go
Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: 51dd68d65949b4b542d65e4de2f1b18550c9cff1
Component: engine
2014-08-06 17:18:50 -04:00
bd46934d5a Move "image_history" to graph/history.go
Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: 55235e121eb2924488508f70b8f30e0e9905d85e
Component: engine
2014-08-06 17:18:50 -04:00
854e47bfb8 Move "image_export" to graph/export.go
Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: 6e28d11d1fde757cf5b9418a2e752717d854f3f3
Component: engine
2014-08-06 17:18:50 -04:00
5d2578de83 Fix graph/tags_unit_test.go on FreeBSD
- Directories should have u+x (0600 -> 0700)
- Don't chown files to root because we don't have to

Docker-DCO-1.1-Signed-off-by: Kato Kazuyoshi <kato.kazuyoshi@gmail.com> (github: kzys)
Upstream-commit: 5ebe86ccf9bedf439b2c90e26dee0f27c0c116f9
Component: engine
2014-07-30 18:06:19 -07:00
e25f77248d Move parsing functions to pkg/parsers and the specific kernel handling
functions to pkg/parsers/kernel, and parsing filters to
pkg/parsers/filter. Adjust imports and package references.

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 4398108433121ce2ac9942e607da20fa1680871a
Component: engine
2014-07-29 13:09:10 -07:00
6ae4c9014c update go import path and libcontainer
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: b3ee9ac74e171e00f14027e39278013629e681b8
Component: engine
2014-07-24 22:19:50 +00:00
1ce22444ec Move truncindex in separate package in pkg/
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Upstream-commit: ed032ddfd68a8654671a13d676c0f7539e36a10b
Component: engine
2014-06-24 21:19:15 +04:00
dcfc8d37e9 docker save: raw json
Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: d3bc787bca62edff384e06a12224be2d982353da
Component: engine
2014-06-20 14:38:17 -04:00
7d55b5369e do not alter json in docker save
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: 3e4e8636c1b05626cae720b47ef99109077e1d3a
Component: engine
2014-06-17 00:06:21 +00:00
83cd706353 Add --storage-opt graph driver option and pass through to driver
This lets you add storage specific options for the daemon.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: 822ea97ffcf10645720bb93108a60f8b9ce9931d
Component: engine
2014-06-05 10:42:27 +02:00
2a289bda14 Standardize API keys: CamelCase
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: 68fb7f4b744bf71206898d32fe203556a6261e5d
Component: engine
2014-05-31 01:22:07 +00:00
82589e5ffd Fix races on TagStore accessing
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Upstream-commit: c4990ab999d49e261c5079925f0b13ef735a729f
Component: engine
2014-05-30 13:36:14 +04:00
7ad9494701 Merge pull request #5855 from philips/remove-dead-code
chore(graph/graph): remove dead code
Upstream-commit: 838d6a9e9b2206ac8952f8693a7c2be8596bee4a
Component: engine
2014-05-30 04:51:12 +03:00
d2e4e6b069 Revert "Always mount a /run tmpfs in the container"
This reverts commit 905795ece624675abe2ec2622b0bbafdb9d7f44c.

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: 8e967fe8028d8362fe3dfb293a8e07a959a4dd7f
Component: engine
2014-05-21 14:28:19 -06:00
b9dbdb7d9e Merge pull request #5755 from vieux/move_inspect_daemon
move inspect from server to daemon
Upstream-commit: 83e9dc720039cfa8685b8dc59f76ca2f1e9489d2
Component: engine
2014-05-20 15:50:38 -07:00
74d86a8d61 move inspect from server to daemon
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: 603e00a3a7644caf118d3efd0932500b4dfc4de3
Component: engine
2014-05-20 19:36:15 +00:00
09f949815a Move init volumes code to func
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: e454be7567e144dc836ff283d4f4e059db307a91
Component: engine
2014-05-19 22:04:51 +00:00
78ed1c0704 chore(graph/graph): remove dead code
This code was introduced with commented out sections. Just delete them.

Original commit: 18fc707fdf06aeb50fa5250f59f0ef4597d7cf73

Docker-DCO-1.1-Signed-off-by: Brandon Philips <brandon.philips@coreos.com> (github: philips)
Upstream-commit: a42e451e10bc7383c82933eb4073e70aaf5aaa8f
Component: engine
2014-05-16 14:26:14 -07:00
23c5da98b4 Always mount a /run tmpfs in the container
All modern distros set up /run to be a tmpfs, see for instance:
https://wiki.debian.org/ReleaseGoals/RunDirectory

Its a very useful place to store pid-files, sockets and other things
that only live at runtime and that should not be stored in the image.

This is also useful when running systemd inside a container, as it
will try to mount /run if not already mounted, which will fail for
non-privileged container.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: 905795ece624675abe2ec2622b0bbafdb9d7f44c
Component: engine
2014-05-12 21:41:04 +02:00
910a692b37 Start separating the image subsystem
This is a first step towards moving all code related to local
manipulation of images into a cleanly separated subsystem,
accessible via a stable set of commands in the engine API.

`graph.TagStore` now implements `engine.Installer`. For now, it
is installed by `Server.InitServer`, along with all other Server
commands. However this will change in future patches.

`graph.TagStore.Install` registers the following commands:

* `image_set` creates a new image and stores it locally.
* `image_get` returns information about an image stored locally.
* `image_tag` assigns a new name and tag to an existing image.

These commands are a pre-requisite for moving 'push' and 'pull'
out of `Server`.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: ff4ef504708bfaa51d4d361455689a21a031cc35
Component: engine
2014-05-09 19:15:26 -07:00
2acb87c29f Initial work on selinux patch
This has every container using the docker daemon's pid for the processes
label so it does not work correctly.
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: f0e6e135a8d733af173bf0b8732c704c9ec716d7
Component: engine
2014-04-29 03:40:05 -07:00
f7be50364d Rename runtime/* to daemon/*
Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: 359b7df5d2af5733b8a1ea6746d062053053b23e
Component: engine
2014-04-17 14:43:01 -07:00
74f0d78beb Enable construction of TruncIndex from id array.
Fixes #5166

Current graph.restore is essentially O(n^2 log n) due to how
suffixarray creation works.

Rather than create/append/create new this supports creation from a seed
array of ids.

Functional testing shows this eliminates the hang on Creating image
graph reported on list.

Docker-DCO-1.1-Signed-off-by: Paul Nasrat <pnasrat@gmail.com> (github: pnasrat)
Upstream-commit: 4f169c2db512d2ea9ed5729df375896a1ee90347
Component: engine
2014-04-11 16:39:58 -04:00
ea28e6ce0e Fix spurious mtab symlink error when /etc doesn't exist yet
symlink /proc/mounts /var/lib/docker/btrfs/subvolumes/1763d6602b8b871f0a79754f1cb0a31b3928bb95de5232b1b8c15c60fa1017f6-init/etc/mtab: no such file or directory

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: 3d9cd1e5f102d5e59011ec4baca2662f3dacbad4
Component: engine
2014-04-09 11:13:54 -06:00
036c540e6a Merge pull request #4779 from vieux/symlink_mtab
symlink /etc/mtab and /proc/mounts
Upstream-commit: b5caa5053a561b02e14dd26395e08351e519dae1
Component: engine
2014-04-02 20:57:04 +03:00
04578891c0 symlink /etc/mtab and /proc/mounts
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: 07b60d626acaddffb6a0b118bfc3f19631411d72
Component: engine
2014-03-31 21:15:03 +00:00