Commit Graph

156 Commits

Author SHA1 Message Date
a2c22efea2 Fixing a typo in spelling
Wrong tense used in a sentence

Signed-off-by: Harshal Patil <harshal.patil@in.ibm.com>
Upstream-commit: 5e1349e0839000f0a6620e139b434c1c60c733a3
Component: engine
2017-03-30 14:31:45 +05:30
d25a95c0e2 Wrap errors in digest package so they are consistent between platforms.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 7abeb08a8cc10d4bc9b218d14f79d9ee27ff62ff
Component: engine
2017-03-08 11:48:46 -05:00
490ab536f0 Use assertions in image package unit tests.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 69d7362058530d7dd97af29dc43fc4d55e73e776
Component: engine
2017-03-08 11:46:10 -05:00
2f3cef62de image/cache: fix isValidParent logic
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 1cf4b2b8bd92562ffe8d7cce8a705efb3ef32ba7
Component: engine
2017-02-21 19:32:04 +01:00
2260389fe6 Use distribution reference
Remove forked reference package. Use normalized named values
everywhere and familiar functions to convert back to familiar
strings for UX and storage compatibility.

Enforce that the source repository in the distribution metadata
is always a normalized string, ignore invalid values which are not.
Update distribution tests to use normalized values.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 3a1279393faf78632bf169619d407e584da84b66
Component: engine
2017-02-07 11:08:37 -08:00
f765025408 some grammatical errors
Signed-off-by: Xinbo Weng <xihuanbo_0521@zju.edu.cn>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5b258f6ac24a4eff83561be8a9707d7762b32ade
Component: engine
2017-01-31 19:33:12 -08:00
adee679878 Merge pull request #29851 from vdemeester/daemon-extract-image-cache
Extract the daemon image cache to its own package
Upstream-commit: df5d909ac95556c861ef27560a141748c84fb5dd
Component: engine
2017-01-26 10:50:35 -08:00
c15d01d9ac Merge pull request #29830 from timthelion/issue29821
Docs: Be more clear when specifying valid formats for strings
Upstream-commit: effc91e7a54a44b50913e1c17a8d173656411847
Component: engine
2017-01-26 10:45:03 -08:00
b14161740b Follow #28926, fix docker save can't share layers in the tar archive.
After https://github.com/docker/docker/pull/28926, if saving multiple images
which have common layers at same time, the common layers can't share in the tar archive
because the hash ID changes because of the Create time. The Create time is used for
pre v1.9 which treat each layer as a image and make no sense for after v1.10.
To make the hash ID consistent and keep the image save from >1.10 working properly
on pre v1.9, using a constant Create time `time.Unix(0,0)`.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: ee5228e799ab82e7f81a9673dec9228469c86dfd
Component: engine
2017-01-17 05:40:59 -05:00
4e32e40a14 image: tarexport: do not quote integers in format string
Basically, prevents outputs like:
```
invalid manifest, layers length mismatch: expected '\x02', got '\x01'
```

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 675f4140e735c71d917241ddfa0d51092aa8bc56
Component: engine
2017-01-14 20:03:11 +01:00
775c5633ef *: use opencontainers/go-digest package
The `digest` data type, used throughout docker for image verification
and identity, has been broken out into `opencontainers/go-digest`. This
PR updates the dependencies and moves uses over to the new type.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: 7a855799175b6b984886ef1cfa337d6df1d4c668
Component: engine
2017-01-06 18:48:41 -08:00
91215c83ce Docs: Be more clear when specifying valid formats for strings
- Use the word letter rather than character to refer to letters ;) when trying to specify that only letters and numbers can be used, and not ANY character...
- Small corrections

Fixes #29821

Signed-off-by: Timothy Hobbs <timothy@hobbs.cz>
Upstream-commit: b71b4e1fb9aac5215aff7ce87e1bbb4010054ecd
Component: engine
2017-01-03 21:40:50 +01:00
70eb9ee7f4 Extract the daemon image cache to its own package
ImageCache is now independent of `Daemon` and is located in
`image/cache` package.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: be1df1ee1302cffe9825a23c05b5ebde3c6da254
Component: engine
2017-01-03 19:19:27 +01:00
42b7611762 Move imageID validation to stringid pkg
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 9f3046f9a03f1a710bdb7fcddd37ff50e71e31c3
Component: engine
2016-12-26 18:53:22 -08:00
37cbce62ca Merge pull request #29345 from yuexiao-wang/fix-err-info
Fix incorrect words and formats in image
Upstream-commit: ba1c20f8d64156eb687a2f2e0a140e0a8ef39f10
Component: engine
2016-12-21 21:50:11 +01:00
209ed6b4ef change minor mistake of spelling
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 7c3657065cc04af278a0f1cee99de8c2401ba0ef
Component: engine
2016-12-20 21:05:19 +08:00
d71866a5fc Fix incorrect info and format of error in image
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: b2ec509a3f9e50980fe3733500df56289c174252
Component: engine
2016-12-20 18:20:15 +08:00
d363742779 return directly without ifs in remaining packages
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: 2c187a24e0003f2f0ab90b85876e668f2b6210d4
Component: engine
2016-12-14 23:28:27 +02:00
bbaccfa1ea Merge pull request #28926 from coolljt0725/fix_save
Fix docker save with empty timestamp of layer created time
Upstream-commit: dd20fa60b4cda5132fea68c585a5b4bf0fbc8d51
Component: engine
2016-11-30 11:23:19 -08:00
0a3180df6c tarexport: check symlink error when saving layer
Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: 8616b0690a3ac905fc6ee06ff7524c837fcb8c92
Component: engine
2016-11-29 13:08:24 -08:00
871bc896d1 Fix docker save with empty timestamp of layer created time
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: e0b2c0af4d08b76311d3d57a96f3f55d55f52388
Component: engine
2016-11-29 03:58:23 -05:00
593e5eb2d5 Windows: Use sequential file access
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 7c29f5beed19b55ac8f14880752d4825ba23eccf
Component: engine
2016-11-14 17:41:52 -08:00
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