Commit Graph

134 Commits

Author SHA1 Message Date
34bac6f06e Fix bunch of typos
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: e6866492c4492db3bb9546afa2fbaed20f4c1883
Component: engine
2016-10-29 15:03:26 +08:00
00676d4d53 Generalize content addressable and reference storage
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 805223982ce7469af0fc42fc4a5115055f7b4843
Component: engine
2016-09-15 18:08:19 -07:00
057c226c2d Merge pull request #25806 from Microsoft/jjh-missingdigest
Don't fail daemon start on missing layer
Upstream-commit: b890d475f7ad128c70cfa49274d1a4cd3fe1109f
Component: engine
2016-09-07 16:35:27 -07:00
7549abdea0 Windows: Skip layers+base images
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 540c8e9b201cfcf46cf9d2c05d42c492edda4117
Component: engine
2016-09-07 12:16:45 -07:00
45ddc4bfcb Add engine-api types to docker
This moves the types for the `engine-api` repo to the existing types
package.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 91e197d614547f0202e6ae9b8a24d88ee131d950
Component: engine
2016-09-07 11:05:58 -07:00
c689c5c3a7 fixes #25654
Signed-off-by: Wenkai Yin <yinw@vmware.com>
Upstream-commit: 8f37abd056db2fdd1d1b23bdfbcbb907f1511fc3
Component: engine
2016-08-31 15:37:52 +08:00
dc95605f3b Document Healthcheck in image spec
Signed-off-by: Thomas Leonard <thomas.leonard@docker.com>
Upstream-commit: 9841cfe4c9af0b63e0c05cd9335bba8bc26a2bb3
Component: engine
2016-08-18 15:53:22 +01:00
3ced96b1ad Merge pull request #25557 from yongtang/25529-image-load-api
Return `application/json` for image/load API (quiet=1)
Upstream-commit: 353af0b3ecfe483568fd88754e432c92b0ec088b
Component: engine
2016-08-12 11:07:43 +02:00
139163d715 Return application/json for image/load API (quite=1)
This fix tries to address the issue raised in 25529 wehre the
image/load API returns `application/json` for quiet=0 and
`text/plain` for quite=1.

This fix makes the change so that `application/json` is returned
for both quiet=0 and quite=1.

This fix has been tested manually.

This fix fixes 25529.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 2f27632cde2f0e514bd3a8de77cc1934e5193a83
Component: engine
2016-08-09 17:55:42 -07:00
1c502571ef add defer file.Close to avoid potential fd leak
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 0ead624473b6bddc232b46bc7c76ab4f9c743ff5
Component: engine
2016-08-10 08:36:09 +08:00
a51fa7c69f Removing old custom RootFS behavior on Windows.
Windows base layers are no longer the special "layers+base" type, so we can remove all the special handling for that.

Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
Upstream-commit: f342b27145d8f5af27cd5de1501551af275e899b
Component: engine
2016-07-29 14:15:59 -07:00
6fbcd4c5d4 Fix calculation of relative path for symlink on docker save
Relative paths are now calculated from a base path rather than from the file path, which gets treated like a directory.
Symlinks will now properly point to the file as "../<layer dir>/layer.tar" rather the incorrect "../../<layer dir>/layer.tar".

Fixes #24951

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 5487881e120e927d7210adf0cb09181092c3ab35
Component: engine
2016-07-25 13:28:10 -07:00
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