Commit Graph

141 Commits (1ec543e38404d80f1670c816f9a0b4389c345796)

Author SHA1 Message Date
Tonis Tiigi 1ec543e384 solver: exclude randomized cache keys from exporter
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-01-18 11:19:25 -08:00
Akihiro Suda 6e7617e889 support local cache exporter and importer
Export:

  $ buildctl build ... --export-cache type=local,store=/path/to/output-dir

Import:

  $ buildctl build ... --import-cache type=local,store=/path/to/input-dir

Impact on CLI:
* Old (deprecated but still effective): `--export-cache localhost:5000/myrepo:buildcache --export-cache-opt mode=max`
* New: `--export-cache type=registry,ref=localhost:5000/myrepo:buildcache,mode=max`

Impact on API:
* New fields are added to control.proto and gateway.proto. The daemon
internally translates old API calls to the new ones.
* While new API can be used for `registry` caches, the client continues
to use the legacy API for `registry` caches to ensure compatibility with
old daemons.
* To import `local` caches with a frontend, the frontend needs to support
a new frontend opt `cache-imports`.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2019-01-19 02:38:26 +09:00
Tonis Tiigi 5fa4642e1d contenthash: clean readlink value
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-10-30 22:14:11 -07:00
Tonis Tiigi 89e8097d4c fix setting uncompressed label on content
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-10-08 23:11:25 -07:00
Ian Campbell b4454a169f implement `gateway.Reference.StatFile` method
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-10-03 12:16:45 +01:00
Ian Campbell df76f6d380 Move cache/fsutil into a separate cache/util subpackage
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-10-03 12:16:44 +01:00
Ian Campbell b30ee91a53 implement `gateway.Reference.ReadDir` method
The alternative is a helper container running e.g. find, capturing the output
to a scratch to be read back (with ref.ReadFile) and parsed.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-10-03 12:16:44 +01:00
Ian Campbell 531ee8d4ea cache: refactor snapshot management out of ReadFile
Allowing for other operations within a mount.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-10-03 12:16:44 +01:00
Ian Campbell 8b69292087 Bump github.com/tonistiigi/fsutil dependency to f567071bed24
7e391b0e78...f567071bed

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-10-03 11:46:35 +01:00
Tonis Tiigi 9bf5431b75 contenthash: fix issues on symlinks on parent paths
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-09-21 13:16:52 -07:00
Tonis Tiigi a93a96b0e3 contenthash: use require in all tests
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-09-21 11:19:15 -07:00
Tibor Vass cb0d51cca3
Merge pull request #630 from tonistiigi/cleanup
golint and misspell cleanup
2018-09-19 12:01:45 -07:00
Tonis Tiigi ae321cc9cf cache: remove the unused old gc primitives
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-09-18 22:06:47 -07:00
Akihiro Suda aa73951164
Merge pull request #631 from jhowardmsft/boltdb
Revendoring to move boltdb to bbolt
2018-09-19 13:59:08 +09:00
John Howard 2de2c04c8e Revendoring to move boltdb to bbolt
Signed-off-by: John Howard <jhoward@microsoft.com>
2018-09-18 11:18:08 -07:00
Tõnis Tiigi 80f959c7ef
Merge pull request #626 from AkihiroSuda/update-golang
update Go to 1.11
2018-09-17 10:35:26 -07:00
Akihiro Suda bf571a519e update Go to 1.11
For consistency with Moby (moby/moby#37358)

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-09-15 14:25:11 +09:00
Tonis Tiigi 757795e556 cache: fix usage counters
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-09-14 18:44:44 -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
Tonis Tiigi 079c747c4e ontrol: support calling automatic GC
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-09-04 18:13:29 -07:00
Tonis Tiigi acab0f6873 cache: correct prune size calculation cache
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-31 12:00:13 -07:00
Tonis Tiigi 28fec2b9cb cache: fix possible prune deadlock
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-31 11:59:53 -07:00
Tonis Tiigi 1a37ee3bf4 cache: add gc style pruning support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-06 21:45:39 -07:00
Tonis Tiigi d1ad6961e3 cache: detect refs shared with image store
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-27 14:08:50 -07:00
Tonis Tiigi 97fa2b527a cache: add all option to prune
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-26 22:55:05 -07:00
Tonis Tiigi 489246dd28 cache: support for internal/frontend record type
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-26 22:54:53 -07:00
Tonis Tiigi 57b96a0ee5 cache: add record type field to usage record
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-26 22:54:39 -07:00
Tonis Tiigi 87f43efda5 cache: implementation for prune filtering
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-25 19:35:49 -07:00
Tonis Tiigi 0ba24f2a90 cache: implement filter for diskusage
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-25 17:20:59 -07:00
Akihiro Suda 56fa35725a vendor: update containerd
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-07-25 16:37:42 +09:00
Tonis Tiigi bc765861be diff: implement windows layer support for linux
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-16 16:33:21 -07:00
Tonis Tiigi 57006ea333 cache: avoid commit on finalize when possible
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-11 16:21:27 -07:00
Akihiro Suda 80d2f820f9 decopule cache/remotecache from registry
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-07-04 17:38:09 +09: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
Tonis Tiigi ccbf185006 llbsolver: allow sharing modes for cache mounts
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-19 15:57:20 -07:00
Tonis Tiigi 6ce604740f vendor: replace locker pkg for legal
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-08 11:00:37 -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 e33d2ac17c contenthash: normalize symlink mode
Mode is not implemented in platform compatible way
so normalize when calculating the checksum.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-01 23:34:51 -07:00
Tonis Tiigi 6b25a56906 dockerfile: support building from a Dockerfile URL
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-05-30 13:20:27 -07:00
Tonis Tiigi 71f5e6dd21 solver: rename solver-next to solver
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-05-14 09:53:34 -07:00
Tonis Tiigi a66885e70c cache: reenable last used metadata
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-05-14 09:53:34 -07:00
Tonis Tiigi 3040783254 cache: helper methods for immutableref
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-05-14 09:53:34 -07: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
Tonis Tiigi f617d38aaa rename cacheimport to remotecache
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-05-14 09:53:34 -07:00
Tonis Tiigi 1f8be73034 update cacheimport variable names
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-05-14 09:53:34 -07:00
Tonis Tiigi a7bc9b9fd2 cache: maintain creation time with remote cache
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-05-14 09:53:34 -07:00
Tonis Tiigi 4ee4ebcb13 cacheimport: fix result checking methods
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-05-14 09:53:34 -07:00
Tonis Tiigi 9c044db670 llbsolver: update pull for multiple cache keys
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-05-14 09:53:34 -07:00
Tonis Tiigi 77c2793ebb remove unused packages
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-05-14 09:53:34 -07:00
Tonis Tiigi 69097924af cache: temporarily remove updateLastUsed
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-05-14 09:53:34 -07:00