Commit Graph

92 Commits

Author SHA1 Message Date
697a990701 fix common misspell
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 99a396902f0ea9d81ef87a683489b2435408f415
Component: engine
2016-02-11 15:49:36 -08:00
0b639e2753 Fixing 'docker save' on Windows.
Save was failing file integrity checksums due to bugs in both
Windows and Docker. This commit includes fixes to file time handling
in tarexport and system.chtimes that are necessary along with
the Windows platform fixes to correctly support save. With this
change, sysfile_backups for windowsfilter driver are no longer
needed, so that code is removed.

Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
Upstream-commit: 041a9510c671ecf4724bf15388fdb9de549b04ed
Component: engine
2016-02-08 18:08:49 -08:00
ae271f1f31 Merge pull request #20078 from cpuguy83/carry_17329
Carry 17329
Upstream-commit: 415dd8688618ac2b3872c6a5b5af3afcef2c3e10
Component: engine
2016-02-07 08:59:36 -08:00
e933ac3b82 carry 17329
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: e9ab5962384f743cb880add60ff27407a1098869
Component: engine
2016-02-06 13:46:21 -05:00
c9beb1316c Clear old parent reference on resetting image parent
On migration 2 different images can end up with same
content addressable ID, meaning `SetParent` will be called
multiple times. Previous version did not clear the old
in-memory reference.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 4852932494b6e13b669937c0e27f0434513f5ad5
Component: engine
2016-02-05 17:05:19 -08:00
311dc4f8a6 Add progress bar to docker load
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: fae09e25698006a190d14fe64f1576f68431fabf
Component: engine
2016-02-05 02:24:23 -05:00
fe296e65a0 Remove package daemonbuilder.
Currently, daemonbuilder package (part of daemon) implemented the
builder backend. However, it was a very thin wrapper around daemon
methods and caused an implementation dependency for api/server build
endpoint. api/server buildrouter should only know about the backend
implementing the /build API endpoint.

Removing daemonbuilder involved moving build specific methods to
respective files in the daemon, where they fit naturally.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 9c332b164f1aefa2407706adf59d50495d6e02cb
Component: engine
2016-02-01 09:57:38 -08:00
fbe586aef3 Update code to compile against new manifest interface
Also, digest.FromBytes no longer returns an error.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: c168a0059f56507731e59c0264d96b5a74f93507
Component: engine
2016-01-08 17:24:20 -08:00
4ec2693c9e Modify import paths to point to the new engine-api package.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 907407d0b2e5863f0e1b40b93a356bbf03c7b9fb
Component: engine
2016-01-06 19:48:59 -05:00
027f002cb3 Move Config and HostConfig from runconfig to types/container.
- Make the API client library completely standalone.
- Move windows partition isolation detection to the client, so the
  driver doesn't use external types.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 7ac4232e70fe7cf7318333cd0890db7f95663079
Component: engine
2015-12-22 13:34:30 -05:00
d33438344b Merge pull request #18727 from tonistiigi/partial-load
Add support for partial load
Upstream-commit: 6ee7c94263e367cfc03c6f08af3bdcd28f70ed7a
Component: engine
2015-12-18 11:10:55 -08:00
31bdfea928 Add support for partial load
Missing layers in tar will not cause an error if 
layers are already loaded before.

Fixes #18723

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: f946782316ea5fa635773587bd4c6da7ecf118b8
Component: engine
2015-12-16 13:46:40 -08:00
31f577ea49 Clean up reference type switches
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: eeb2d4c1adbe4e00f9fbcdc70f9ac31997968e1d
Component: engine
2015-12-16 11:58:53 -08:00
9b8bb0d4e1 Update Named reference with validation of conversions
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: ffded61dad76e4c6530359d879afe83907e409a7
Component: engine
2015-12-16 11:58:52 -08:00
020b74d545 Add own reference package wrapper
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 2655954c2dd9d92c2394b04e4262543174c4c038
Component: engine
2015-12-16 11:58:52 -08:00
3c4fcf6b7a Fix typos found across repository
Signed-off-by: Justas Brazauskas <brazauskasjustas@gmail.com>
Upstream-commit: 927b334ebfc786276a039e45ec097e71bf9a104c
Component: engine
2015-12-13 18:04:12 +02:00
aedf5127c5 Fix image deletion conflicts with search
Removed images were not cleaned up from the
digest-set that is used for the search index.

Fixes #18437

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: fcb083c6ac0fdb71e8db7a58f07a561342d631d3
Component: engine
2015-12-04 13:15:54 -08:00
21928a9bde Merge pull request #18226 from duglin/Issue18170
Fix for zero-sized layers
Upstream-commit: a26accfb5d52f81b6df339da36855b85d3a473fe
Component: engine
2015-11-30 09:57:37 -06:00
72a5c00834 Merge pull request #18252 from aaronlehmann/tarstream-readcloser
Make TarStream return an io.ReadCloser
Upstream-commit: 9ebf7dfae324d8fad524c9578ed850bf3b116d32
Component: engine
2015-11-25 21:35:21 -05:00
a047f4a27c Fix for zero-sized layers
Moved a defer up to a better spot.

Fixed TestUntarPathWithInvalidDest to actually fail for the right reason

Closes #18170

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 7bb9fc415ac50abf5f754005264bfe152eeca7d6
Component: engine
2015-11-25 18:02:03 -08:00
c88fa0bb83 Make TarStream return an io.ReadCloser
Currently, the resources associated with the io.Reader returned by
TarStream are only freed when it is read until EOF. This means that
partial uploads or exports (for example, in the case of a full disk or
severed connection) can leak a goroutine and open file. This commit
changes TarStream to return an io.ReadCloser. Resources are freed when
Close is called.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 21278efaee563b356851a530b08b0537fee095d7
Component: engine
2015-11-25 16:39:54 -08:00
c91b830a96 Validate adding digests to tagstore with go types
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 20e759ab56e9c17cfe0fbe839cdd4ac9ee6f0752
Component: engine
2015-11-25 15:06:51 -08:00
bf504ef9d6 Add image store
The image store abstracts image handling. It keeps track of the
available images, and makes it possible to delete existing images or
register new ones. The image store holds references to the underlying
layers for each image.

The image/v1 package provides compatibility functions for interoperating
with older (non-content-addressable) image structures.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 01ba0a935b9227583ec05a96e85273cc2276bb93
Component: engine
2015-11-24 09:40:24 -08:00
99a2fbf27e Revert "Tidy config/hostconfig structures"
This reverts commit ad5052df234e4f48a93e22694f91fda36bb9e95d.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 3a1200f9f11a016abd75588fa3812fb5505b2c3a
Component: engine
2015-11-09 15:46:45 -05:00
5802185475 Tidy config/hostconfig structures
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: ad5052df234e4f48a93e22694f91fda36bb9e95d
Component: engine
2015-11-06 17:53:46 -08:00
f7f7ce4926 Windows: Add volume support
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: a7e686a779523100a092acb2683b849126953931
Component: engine
2015-10-22 10:42:53 -07:00
eb67a37877 Calculate hash based image IDs on pull
Generate a hash chain involving the image configuration, layer digests,
and parent image hashes. Use the digests to compute IDs for each image
in a manifest, instead of using the remotely specified IDs.

To avoid breaking users' caches, check for images already in the graph
under old IDs, and avoid repulling an image if the version on disk under
the legacy ID ends up with the same digest that was computed from the
manifest for that image.

When a calculated ID already exists in the graph but can't be verified,
continue trying SHA256(digest) until a suitable ID is found.

"save" and "load" are not changed to use a similar scheme. "load" will
preserve the IDs present in the tar file.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 504e67b867865a2835e8002c01087a2cfd7bfd0e
Component: engine
2015-10-12 10:51:28 -07:00
71a51a6ff7 Adding error codes to image package
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: da0ca83377db0228db82b7be4096b34e3ebfb114
Component: engine
2015-09-23 17:03:37 +00:00
d3974d0227 /image - fix lint errors/warnings
Addresses #14756
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: b061572916c5bb959a24f8382b21429c9d81620c
Component: engine
2015-07-27 05:40:57 +00:00
b70343dc2b Fixing Image struct to no longer use Graph.
Signed-off-by:  John Howard <jhoward@microsoft.com>
Upstream-commit: 9001ea26e7821239207586ad23c78c67d6926bfc
Component: engine
2015-07-20 13:59:53 -07:00
1296feade8 Windows: Graph driver implementation
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 52f4d09ffb376ffaa6677cb1e0413c6a97f53f24
Component: engine
2015-07-10 14:33:11 -07:00
57eb64c9c0 Carry of PR #13520
Removinig files

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: cd44018856be421497a35d96f88dd0eec42fae43
Component: engine
2015-06-13 09:27:30 -07:00
6825ac1c62 Separate graph from image
Move graph related functions in image to graph package.
Consolidating graph functionality is the first step in refactoring graph into an image store model.
Subsequent refactors will involve breaking up graph into multiple types with a strongly defined interface.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 2b58b677a54950bc78c13760ef79fe6284154847
Component: engine
2015-06-05 18:06:09 -07:00
7716bbfe5b Fix spelling mistakes in documentation
While reading  some of the docs I noticed a few errors, so I ran
misspellings (https://pypi.python.org/pypi/misspellings) on markdown files

Signed-off-by: Joe Gordon <joe.gordon0@gmail.com>
Upstream-commit: 3d87b80b46d45c2ca7c0fbcbcbb3fcf97a48444b
Component: engine
2015-05-31 11:53:23 -07:00
3fb26e927f image: precompile regexp
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: 8f57e7d2ef82d39e2c914b799e98ed6243b9b1d0
Component: engine
2015-05-13 21:47:43 +03:00
23b13c08d5 Windows: Fix filepath vs path in image.go
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 1c3b697d60bc1a5f5197b0c3a432002cf03c8277
Component: engine
2015-05-04 16:23:17 -07:00
954f940156 Small if err cleaning
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 844538142d95c1b7dda1bb2903179510105fe9b5
Component: engine
2015-04-27 21:50:33 +02:00
7a651c5c69 v1 spec: fix typos and formatting
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
Upstream-commit: d6c839cf0f04f30ba95e2b032a4e686dea2eb0d0
Component: engine
2015-04-23 08:19:52 +02:00
a4111cba55 Refactor utils/utils, fixes #11923
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: c30a55f14dbbe3971ba0ac716ba69a60868f4490
Component: engine
2015-04-14 01:37:36 +02:00
b67ac7ee80 when the file that was opened has been read into buffer, the file should be close.
Signed-off-by: Mabin <bin.ma@huawei.com>
Upstream-commit: d5ea4bae4a15cc9f3c16c046389737682277ff0f
Component: engine
2015-02-27 19:09:17 +08:00
1a1db2c237 Remove Checksum field from image.Image struct
The checksum is now being stored in a separate file beside the image
JSON file.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 3414307306dc1780f80c5ca5e9dd7a8822e27eec
Component: engine
2015-01-30 09:37:50 -08:00
7164984f64 Store tar checksum in separate file
Fixes #10432

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: e9f6f1a930b74c6b06f257eac838d062bbdd0d16
Component: engine
2015-01-29 21:28:20 -08:00
a2ae7e0198 No longer compute checksum when installing images.
While checksums are verified when a layer is pulled from v2 registries,
there are known issues where the checksum may change when the layer diff
is computed again. To avoid these issues, the checksum should no longer
be computed and stored until after it has been extracted to the docker
storage driver. The checksums are instead computed lazily before they
are pushed to a v2 registry.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: e636df8d9637514e125afe7418a3b98e5270858f
Component: engine
2015-01-29 13:52:59 -08:00
c4558ad58c Merge pull request #10305 from jlhawn/use_tarsum_v1
Always store images with tarsum.v1 checksum added
Upstream-commit: bfa0dc47da2d9e6399fa32bda72a7074224c815d
Component: engine
2015-01-26 14:42:07 -08:00
917ff61a98 Merge pull request #10333 from jlhawn/image_json_schema_reword
Updated image spec docs to clarify image JSON
Upstream-commit: 283597ad37446ccad57f6ba881652ee6f67e576e
Component: engine
2015-01-26 07:49:44 -05:00
f145851625 Updated image spec docs to clarify image JSON
The title `Image JSON Schema` was used as a header in the section
which describes the layout and fields of the image metadata JSON
file. It was pointed out that `JSON Schema` is its own term for
describing JSON in a machine-and-human-readable format, while the
word "Schema" in this context was used more generically to say that
the section is meant to be an example and outline of the Image JSON.

http://spacetelescope.github.io/understanding-json-schema/

This section now has the title `Image JSON Description` in order
to not cause this confusion.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 71763636f232477b0c890e0506b7b858505f1b33
Component: engine
2015-01-24 10:21:11 -08:00
1c5b6614c3 Make debugs logs suck less.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: c49cd3d2a51ad6d2304c24f7b609cde804a0d6c5
Component: engine
2015-01-23 13:20:29 -08:00
cc58d5c62d Always store images with tarsum.v1 checksum added
Updates `image.StoreImage()` to always ensure that images
that are installed in Docker have a tarsum.v1 checksum.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: ba3bad66f92da057dba2a43ff9a512cf7ad72375
Component: engine
2015-01-23 11:30:27 -08:00
c13d2851b8 Add Tarsum Calculation during v2 Pull operation
While the v2 pull operation is writing the body of the layer blob to disk
it now computes the tarsum checksum of the archive before extracting it to
the backend storage driver. If the checksum does not match that from the
image manifest an error is raised.

Also adds more debug logging to the pull operation and fixes existing test
cases which were failing. Adds a reverse lookup constructor to the tarsum
package so that you can get a tarsum object using a checksum label.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 213e3d116642431adbe634d39740eddc5a81e063
Component: engine
2015-01-15 14:05:05 -08:00
647f575a6c Typo creating -> created
Signed-off-by: Ankush Agarwal <ankushagarwal11@gmail.com>
Upstream-commit: 82bfb3852ea0835d96d456c256f40633b020bd1e
Component: engine
2015-01-14 23:02:17 -08:00