Commit Graph

122 Commits

Author SHA1 Message Date
3660e7a630 image spec: Correct set of acceptable characters in tags
The image spec did not match the regexp that validates tags. It
neglected to mention that period and dash characters are allowed in
tags, as long as they are not the first character. It also did not
mention the length limit for tags.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 2f19e910bdeee94a2962ce8457325e92aa21ce0e
Component: engine
2016-07-05 10:02:16 -07:00
0bdbf282f3 Fix spelling in comments, strings and documentation
Signed-off-by: Otto Kekäläinen <otto@seravo.fi>
Upstream-commit: 644a7426cc31c338fedb6574d2b88d1cc2f43a08
Component: engine
2016-07-03 20:58:11 +03:00
186c875016 Merge pull request #24003 from tonistiigi/fix-duplicate-layers
Fix duplicate layers in exported tar
Upstream-commit: 98094460602130039a8ae576ca2b5a559d1bd274
Component: engine
2016-06-30 17:07:58 -07:00
b9ac815dbd Fix duplicate layers in exported tar
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 41bf7de73be5d35f40aca9eb68064aa3e8bb9a54
Component: engine
2016-06-29 18:06:42 -07:00
735206e7dd Report load progress on compressed layer size
When calling docker load on an image tar containing a compressed layer,
apply NewProgressReader to the compressed layer (whose size is known), not
the uncompressed stream. This fixes progress reporting to the client in
this case.

Signed-off-by: John Starks <jostarks@microsoft.com>
Upstream-commit: 5fd8edec1c3fff52eebe2d62694c93141d8756ba
Component: engine
2016-06-24 15:28:26 -07:00
a3be33ddb5 Say something useful during docker load
During a `docker load` there are times when nothing is printed
to the screen, leaving the user with no idea whether something happened.
When something *is* printed, often its just something like:
```
1834950e52ce: Loading layer 1.311 MB/1.311 MB
5f70bf18a086: Loading layer 1.024 kB/1.024 kB
```
which isn't necessarily the same as the image IDs.

This PR will either show:
- all of the tags for the image, or
- all of the image IDs if there are no tags

Sample output:
```
$ docker load -i busybox.tar
Loaded image: busybox:latest

$ docker load -i a.tar
Loaded image ID: sha256:47bcc53f74dc94b1920f0b34f6036096526296767650f223433fe65c35f149eb
```

IOW, show the human-friendly stuff first and then only if there are no tags
default back to the image IDs, so they have something to work with.

For me this this is needed because I have lots of images and after a
recent `docker load` I had no idea what image I just imported and had a
hard time figuring it out.  This should fix that by telling the user
which images they just imported.

I'll add tests once there's agreement that we want this change.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 6986a3220fe59146eeddeaa865561472abc7baeb
Component: engine
2016-06-08 17:17:05 +02:00
1e36058e8c Use describable interfaces
Replace use of foreign sources with descriptors and describable

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 2c60430a3d1431e0879aa1c66ca23143de987b35
Component: engine
2016-06-06 17:49:34 -07:00
3ff13f560e Merge pull request #22866 from jstarks/foreign_layers
Support layers from external URLs
Upstream-commit: 7d08f3a5ad16446952b9b461feb0895a5c73ea58
Component: engine
2016-06-07 00:27:40 +00:00
770153eec3 Support layers from external URLs
This is used to support downloading Windows base images from Microsoft
servers.

Signed-off-by: John Starks <jostarks@microsoft.com>
Upstream-commit: 05bd04350b8348b3c3bbe3156420257313e4e804
Component: engine
2016-05-25 19:23:02 -07:00
3185dc9996 Merge pull request #22264 from aaronlehmann/updated-image-spec
Update image specification for content-addressability changes
Upstream-commit: 7faa2a40bcfc2c8600a6895d09235081730d6f46
Component: engine
2016-05-24 18:06:52 +02:00
c73585cbcb Update image specification for content-addressability changes
The image spec in image/spec/v1.md is quite a bit out of date. Not only
is it missing the changes that went into 1.10 for content
addressability, but it has inaccuracies that date back further, such as
mentioning storing tarsum in the image configuration.

This commit creates image/spec/v1.1.md which brings the specification up
to date. It discusses content addressability, new fields in the image
configuration, the repository/tag grammar, and the current mechanism for
exporting an image.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 4fa0eccd10c5c120fe1f641285db920cf643dbe8
Component: engine
2016-05-12 11:12:34 -07:00
8e29ebccd1 image/tarexport: fix error formatting
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: a2eacff5c755d3257f453c9555526549bc3753b1
Component: engine
2016-05-02 10:26:32 -07:00
ff027b364b Add load/save image event support
For every docker load and save operations, it would log related
image events.

Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
Upstream-commit: 06561057103441fe176910e12674d998b8561b75
Component: engine
2016-04-27 01:11:03 +00:00
e3c27e0ed4 Safer file io for configuration files
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: ea3cbd3274664f5b16fce78d7df036f6b5c94e30
Component: engine
2016-04-21 11:31:15 -07:00
03d17b8c5f Update code for latest engine-api
- Update CopyToContainer uses
- Use engine-api/types/versions instead of pkg/version

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 7534f17261d0bb74557ca2f7cd893d5b7b531d49
Component: engine
2016-04-19 16:56:54 +02:00
c47b0699eb Clean up unused code
Signed-off-by: Akihiro Suda <suda.kyoto@gmail.com>
Upstream-commit: d231260868507174d60ff58b18b14fa5bc2d5b66
Component: engine
2016-04-14 07:04:10 +00:00
94711fe63a Fix docker load progressbar, fixes #21957
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 96d7db665b06cc0bbede22d818c69dc5f6921f66
Component: engine
2016-04-12 22:45:42 -04:00
212dd88448 Merge pull request #21819 from tophj-ibm/fix-ensure-emptyfs-other-architectures
Fix .ensure-emptyfs on non-x86_64 architectures
Upstream-commit: 3f39035f1862b20aa59c0e26f42794df9ff731bc
Component: engine
2016-04-09 13:40:45 -07:00
a54dc68a13 Fix .ensure-emptyfs on non-x86_64 architectures
Now that we are checking if the image and host have the same architectures
via #21272, this value should be null so that the test passes on non-x86
machines

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: 1f59bc8c03df18686b93a0cd619cf2c55cbcf421
Component: engine
2016-04-08 17:38:13 -04:00
cfe0e7d529 Windows: Support non-base-layered images
Previously, Windows only supported running with a OS-managed base image.
With this change, Windows supports normal, Linux-like layered images, too.

Signed-off-by: John Starks <jostarks@microsoft.com>
Upstream-commit: d45a26d7e24719814bc321db6fa173110af30740
Component: engine
2016-04-07 17:52:26 -07:00
4815437b5f Add os_version and os_features to Image
These fields are needed to specify the exact version of Windows that an
image can run on. They may be useful for other platforms in the future.

This also changes image.store.Create to validate that the loaded image is
supported on the current machine. This change affects Linux as well, since
it now validates the architecture and OS fields.

Signed-off-by: John Starks <jostarks@microsoft.com>
Upstream-commit: 194eaa5c0f843257e66b68bd735786308a9d93b2
Component: engine
2016-04-04 13:14:57 -07:00
d833f49cea Add parent references support to load/save
Restores the correct parent chain relationship
between images on docker load if multiple images
have been saved.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: faeff5118f710f7c4f6173c309b52aaba24118c9
Component: engine
2016-03-21 19:31:10 -07:00
9694bed63e Merge pull request #21002 from tonistiigi/fix-id-noprefix
Fix docker run for 64 byte hex ID
Upstream-commit: df20b5cfd337bb3093fd87e278501fbca4480d54
Component: engine
2016-03-14 10:17:38 -07:00
7d0b608cf5 Fix docker run for 64 byte hex ID
Fixes #20972

Also makes sure there is no check to registry if
no image is found for the prefixed IDs.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 16e4c4e481aca8d5a99d5a4760b5d27bf5bbb9fd
Component: engine
2016-03-11 10:02:47 -08:00
1585d5df26 fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: bbeb859b6490a03d7c4265762711b551c22e914d
Component: engine
2016-03-11 23:22:16 +08:00
5ab9ec7f3a Refine error message when save non-exist image
Fixes: #20709
As discussed in the issue, we need refine the message to
help user more understood, what happened for non-exist image.

Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
Upstream-commit: ed231d409501d1e496fbe2b2e31a279eb2998cf2
Component: engine
2016-03-08 01:45:19 +00:00
98394b0b6e Vendor engine-api to 70d266e96080e3c3d63c55a4d8659e00ac1f7e6c
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 53b0d62683ee798198c553353dc2106623a9259b
Component: engine
2016-02-29 19:28:37 +08:00
d0fa8c5e37 Merge pull request #20572 from runcom/sudo-user
resolve the config file from the sudo user
Upstream-commit: 61d24e769d9f7a075f6881ba8b4523d5db9dcd6d
Component: engine
2016-02-25 16:05:25 +01:00
008e491a8c resolve the config file from the sudo user
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: afde6450ee7bd4a43765fdc0a9799b411276d9e4
Component: engine
2016-02-24 15:41:00 +01:00
f62b97e499 Fix some typos in comments and strings
Most of them were found and fixed by codespell.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Upstream-commit: 2eee613326fb59fd168849618d14a9054a40f9f5
Component: engine
2016-02-22 20:27:15 +01:00
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