Commit Graph

172 Commits (130f5f5ab0c9023fc19218291ddc3087b8f2907f)

Author SHA1 Message Date
Tonis Tiigi 130f5f5ab0 solver: net host with basic entitlements support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-09 14:03:35 -07:00
Tõnis Tiigi 47c4888ab1
Merge pull request #551 from tonistiigi/gc-prune
cache: add gc style pruning support
2018-08-07 11:14:46 -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 bf29f5bd3b client: add test for extra hosts
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-03 13:56:13 -07:00
Tonis Tiigi f7359f7093 llb: add extrahost support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-03 13:56:13 -07:00
Tonis Tiigi 4c44d2c6e4 dockerfile: custom names to vertexes
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-31 10:41:30 -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
Tibor Vass aa81807f1c
Merge pull request #542 from tonistiigi/resolvemode
llb: add resolvemode to image source
2018-07-26 14:04:27 -07:00
Tonis Tiigi 9f5e5c7dc7 metaresolver: refactor to option struct and resolvemode
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-25 18:22:15 -07:00
Tonis Tiigi a3b5d22419 llb: add resolvemode to image source
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-25 18:20:04 -07:00
Tonis Tiigi 70e0b64482 client: generalize the filter passing
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-25 18:19:31 -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
Tonis Tiigi f719aadcba dockerfile: add tests for multi-platform exports
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-25 16:01:12 -07:00
Tonis Tiigi 53f657a5db client: add secret mounts test
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-19 22:02:11 -07:00
Tonis Tiigi 378df8cbaa llb: add secrets support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-19 22:02:11 -07:00
Tonis Tiigi d4c57aec5d llb: add caps support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-18 17:22:30 -07:00
Tonis Tiigi c9df92f4c5 imagemetaresolver: use platform in cache
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-17 18:36:32 -07:00
Tonis Tiigi 1456a3f165 llb: don't fill platform on static sources
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-16 15:27:03 -07:00
Akihiro Suda dca7bdcd4c
Merge pull request #495 from tonistiigi/unique-local
llb: set unique ID to local sources without session
2018-07-10 20:34:04 +09:00
Tonis Tiigi 946a12eb42 gateway: expose worker information
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-09 16:32:39 -07:00
Tonis Tiigi 40e270a2e6 llb: set unique ID to local sources without session
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-09 16:27:12 -07:00
Tonis Tiigi 3fa70c6b25 client: simplify parallel sources test
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-09 16:27:08 -07:00
Ian Campbell 0dd25df7e2 client: add test case for multiple parallel builds.
It appears that multiple parallel builds suffer some cross talk between their
mount/snapshots e.g. this new case currently fails because iterations see files
in `/src/` which correspond to other iterations (i.e. iteration 1 might see a
file called "test2.txt"). The `ls -i` and `stat` output also confirms that
where tests see the same filename they are also apparently seeing the same
inode.

Note that each solve uses a `SolverOpt.SharedKey` of the (unique) source
directory so there should be no clashes. Use of `llb.sharedKeyHint()` is
avoided since using a unique one of these hides the issue (AIUI uniqueness of
`sharedKeyHint` is only required with a session, not between them).

The shell fragment within the test is a bit crazy, it tries to output as much
info about what it saw vs what was expected to aid debugging.

I have also been seeing cases in my own code where `cacheContext.checksum`
fails the `not found` test at the top, which seems like either the wrong thing
is mounted or it has gone away or otherwise been mutated unexpectedly. I had
been hoping that this test case would also reproduce this, but so far it has
not.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-07-09 15:44:28 -07:00
Tõnis Tiigi f3b743bd13
Merge pull request #467 from dmcgowan/export-oci-media-types
Support creating and pushing OCI types
2018-06-28 14:46:34 -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
Tonis Tiigi e618878451 dockerfile: platform support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-25 11:06:08 -07:00
Tonis Tiigi f9383c48a3 source: image source platform support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-25 10:39:17 -07:00
Akihiro Suda 19612b901f
Merge pull request #462 from tonistiigi/llbconstraints
llb: force platform in llb and allow constraints
2018-06-26 01:03:38 +09:00
Tonis Tiigi 242697af59 llb: add marshal roundtrip tests for platform
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-22 17:55:36 -07:00
Tonis Tiigi d34e4c68b5 llb: automatically carry platform with state chain
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-22 16:49:03 -07:00
Tonis Tiigi dc9de85069 llb: force platform in llb and allow constraints
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-22 16:49:03 -07:00
Tonis Tiigi a1bafadfd5 worker: add platforms support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-22 11:46:46 -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
Ian Campbell 97ffd6cce8 client: take a context.Context to New().
This allows two things:

- The caller to set a shorter timeout than previously hardcoded 30s. In
  `buildctl` reduce the timeout to 5s. Since the existing timeout has gone
  callers will need to arrange to pass one themselves.
- The caller can arrange for the context to be cancelled for other reasons, use
  this in `buildctl` to plumb through the Ctrl-C handling, meaning that
  `buildctl` now exits almost immediately on Ctrl-C instead of after several
  seconds.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-06-11 14:28:08 +01:00
Tonis Tiigi 30461204da vendor: update fsutil to fix local source bug
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-10 09:22:59 -07:00
Akihiro Suda f381aaac05
Merge pull request #445 from tonistiigi/tmpfs
llbsolver: add support for tmpfs mounts to exec
2018-06-09 11:52:16 +09:00
Tonis Tiigi 596b03a8a0 llbsolver: allow tmpfs mounts
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-08 13:05:14 -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 60344aa592
Merge pull request #442 from tonistiigi/runmount
dockerfile: add run --mount support
2018-06-09 02:35:34 +09:00
Tõnis Tiigi 7943598281
Merge pull request #439 from AkihiroSuda/vendor-containerd-20180606
update containerd library
2018-06-08 10:33:10 -07:00
Akihiro Suda cf4cc2d6d0
Merge pull request #431 from tonistiigi/dockerfile-symlinks
dockerfile: detect source symlinks with targets
2018-06-08 21:57:53 +09: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 055dcb6c09 local: allow followpaths for local source
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-07 23:23:13 -07:00
Tonis Tiigi 479419abf2 llbsolver: don’t error on readonly scratch mount
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-07 16:23:53 -07:00
Nao YONASHIRO 28fc483de0 client: use grpc.DialContext and context.WithTimeout instead of grpc.WithTimeout
Currently, grpc.WithTimeout is deprecated.
2018-06-05 17:34:49 +09:00
Tonis Tiigi 1067c24df2 git: support all git transports
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-05-29 10:56:08 -07:00
Ian Campbell ef1a79a1c1 Allow caller to specify platform for use with imagemetaresolver.
This needs to be plumbed through to `imageutil.Config` which is also used from
the `containerimage` package. Since that is used in the context of a Worker the
`platforms.Default()` (corresponding to the platform of the worker itself) is
appropriate so apply a default at that level.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-05-24 11:23:35 +01:00