Commit Graph

75 Commits (b93b5b62d12ae656ef82a7218f9380278261373f)

Author SHA1 Message Date
Tõnis Tiigi b055d2d55c
Merge pull request #2057 from ktock/export-compression
exporter: Enable to specify the compression type for all layers of the finally exported image
2021-07-06 21:52:36 -07:00
ktock 3152eab58f Enable to forcefully specify compression type
Signed-off-by: ktock <ktokunaga.mail@gmail.com>
2021-07-07 12:00:06 +09:00
Cory Bennett b1d441b175 [#2112] progress.FromContext returns a writer factory
this allows progress.Controller to manage the writer lifecycle

Signed-off-by: Cory Bennett <cbennett@netflix.com>
2021-06-28 18:58:29 +00:00
Tonis Tiigi 1098f8ee82 exporter: return config digest when exporting single-arch image
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-12-14 13:26:16 -08:00
Tonis Tiigi e3b05289d8 add session injection to remote loading
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-11-02 22:20:44 -08:00
Tonis Tiigi ecf070a027 exec: use platform specific default path
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-10-23 15:30:23 -07:00
Akihiro Suda dda009a58c
Merge pull request #1739 from tonistiigi/empty-layer
clear file mount stubs and fix empty layer cases
2020-10-21 00:42:45 +09:00
Tonis Tiigi c7f5979dd4 exporter: avoid descriptor annotations on docker manifests
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-10-19 12:54:47 -07:00
Tonis Tiigi c8b8d6ce63 exptypes: define empty gz layer digest
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-10-18 23:39:23 -07:00
Tonis Tiigi f9d7f1cf4a exporter: don’t keep timestamp for empty layer
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-10-18 23:39:23 -07:00
Erik Sipsma 55cbd19dec Add support for lazily-pulled blobs in cache manager.
This allows the layers of images to only be pulled if/once they are actually
required.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2020-08-05 17:18:43 -07:00
Tonis Tiigi c8190b1518 lint: enable golint
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-19 09:28:24 -07:00
Tonis Tiigi 2e9987ad16 session: track sessions with a group construct
Avoid hidden session passing and allow one session to drop when
multiple builds share a vertex.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-05 00:15:25 -07:00
Erik Sipsma 61bd44337b image export: Use correct media type when creating new layer blobs.
There are a few bugs in the image export related code being fixed here.
GetMediaTypeForLayers was iterating over diffPairs in the wrong order, resulting
in it always returning nil for images with more than one layer. This actually
worked most of the time because it accidentally triggered a separate codepath
meant to handle v0.6 migrations where mediatypes left empty get filled in.
However, fixing that bug revealed another existing bug where the "oci" parameter
in the image exporter was not being honored except when the v0.6 codepath got
followed, resulting in images to always have oci layer media types even when
docker types are used for the rest of the image descriptors.

Due to the interaction between these various bugs, the only practical end effect
previously was that single-layer images could use the wrong layer media type. An
existing test has been expanded to cover that case in a previous commit.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2020-06-24 12:07:00 -07:00
Tonis Tiigi 37b8832d00 upgrade errors checks to Is()
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-18 22:53:38 -07:00
Tonis Tiigi 2c3cf11fde resolver: update to new registryhosts based config
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-03-05 19:56:43 -08:00
Wei Fu 65388edc6c exporter: support compression for layer blob data
Allow user to choose the compression type for layer data. Gzip is
default compression for layer exporter, which consume more Cpu resources
and take long time to export. With compression option, user can use
nocompressed option to export to save time. And future, zstd is one new
option for end-user.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2019-12-09 23:51:38 +08:00
Tõnis Tiigi e486c1193f
Merge pull request #1247 from tonistiigi/dangling-naming
exporter: add canonical and dangling image naming
2019-11-12 10:02:04 -08:00
Tonis Tiigi 044271e0ad exporter: add canonical and dangling image naming
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-11-06 17:32:24 -08:00
Tonis Tiigi 01cfdcd8f2 exporter: keeps blob refs on images
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-11-06 17:30:21 -08:00
Tonis Tiigi 339d4b2fef leaseutil: mark temporary leases with timestamps
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-10-16 10:35:50 -07:00
Tonis Tiigi bbc8b6dc6f exporter: remove label based linking
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-10-16 10:33:03 -07:00
Tonis Tiigi a9209caa93 clean up temporary leases on startup after crash
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-10-16 10:32:57 -07:00
Tonis Tiigi 688e2c2272 cache: update components to new lease based cache manager
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-10-16 10:32:04 -07:00
Tonis Tiigi 0d22b5056f exporter: keep lease when exporting images
As manifests may be temporary if the same image is built in parallel one build can delete the manifest+config before the export for another finishes.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-07-12 13:12:45 -07:00
Tõnis Tiigi 3c78a9c736
Merge pull request #909 from fuweid/me-allow-unpack-action
exporter: support unpack opt for image exporter
2019-04-26 14:04:48 -07:00
Wei Fu ffad8ada79 exporter: support unpack opt for image exporter
It is enhancement which allows to unpack image into containerd
snapshotter storage by `--output type=image,<.>=<.>,unpack=true`.

In order to support this feature, we needs to extend the Snapshotter
witwh `Name() string` function. Because we needs to set gc label for
snapshotter which need snapshotter name.

fix: #908

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2019-04-24 21:24:06 +08:00
Tonis Tiigi 427e2f0a5f exporter: put arm variant in the image config
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-22 18:01:30 -07:00
Tonis Tiigi 37bfc6546c exporter: allow push by digest in image exporter
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-18 16:00:48 -07:00
Tonis Tiigi d514afdb20 remotecache: support createdat and fix order
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-01-21 19:39:15 -08:00
Tonis Tiigi 97eff70c5e inline remote cache support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-01-21 19:39:15 -08:00
Tonis Tiigi db3db1033d dockerfile: ensure metadata commands have created time
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-01-18 11:14:45 -08:00
Edgar Lee 688972691f Fix typo in error getting diff pairs 2018-09-21 13:56:05 -07:00
Tonis Tiigi ecd4a22546 resolver: add config support for mirrors/plainhttp
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-09-07 18:44:45 -07:00
Ian Campbell 03a9cb89af exporter: Use "*" to signify that client allows frontend to set image name
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-08-31 17:34:49 +01:00
Ian Campbell aa51b40649 Include exported image name in ExporterResponse metadata
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-08-31 11:07:32 +01:00
Ian Campbell 8d114533c2 exports: require caller to request frontend-based naming, by passing name of `%s`.
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-08-30 15:59:06 +01:00
Ian Campbell fa39d134ee exporters: allow frontend control of the exported image name
Returning a metadata item named "image.name" will set the name to use.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-08-17 13:20:36 +01:00
Tino Rusch f9ab15123d
exporters: containerimage: allow targetName to be a comma separated list and loop through it while pushing. 2018-08-07 09:59:47 +02:00
Tõnis Tiigi c6aa1817a1
Merge pull request #558 from ijc/exporters-multiple-custom-metadata
exporters: allow for more than one non-standard metadata key
2018-08-06 11:11:45 -07:00
Ian Campbell 075c54589c exporters: allow for more than one non-standard metadata key
I think this was just a thinko.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-08-06 10:23:46 +01:00
Ian Campbell fb13b26419 Initialise `src.Metadata` in all `{image,oci}ExporterInstance.Export`
Failure to do so would potentially lead to a panic. Belt & braces followup
for #555.

`localExporterInstance` has no `e.meta` to merge and makes no use of the
`Metadata` anyhow (since that doesn't seem to make sense for a local export) so
is unmodified.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-08-06 09:59:00 +01:00
Tonis Tiigi 6be1257f5d export: manifest list support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-25 16:01:12 -07:00
Tonis Tiigi 8c065401f2 exporter: reuse exptypes constants
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-25 16:01:12 -07:00
Tonis Tiigi 33f4382b69 dockerfile: support exporting multiple platforms
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-25 14:37:01 -07:00
Tonis Tiigi d70d816dee exporter: update export signature
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-25 14:37:01 -07:00
Derek McGowan 618f34a1f9 Support creating and pushing OCI types
Adds image and oci exporter option "oci-mediatypes"
Ensures that the images created in the content store
have the correct type which matches the manifest.
Sets the correct media type on the descriptor in push from
reading the type specified in the manifest.
Removes use of distribution manifest packages.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2018-06-28 11:23:35 -07:00
Akihiro Suda 47a00b84fe update containerd library
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-06-08 21:44:17 +09:00
Tonis Tiigi f00ba89a30 llbsolver: support detecting existing remotes
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-05-14 09:53:34 -07:00
Akihiro Suda 2b9ee222d7 exporter/containerimage: fix handling empty option values
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-05-08 21:45:38 +09:00