Commit Graph

172 Commits (130f5f5ab0c9023fc19218291ddc3087b8f2907f)

Author SHA1 Message Date
Akihiro Suda 06d81be140
Merge pull request #401 from tonistiigi/relative-wd
llb: fix relative working directory in client
2018-05-22 16:04:24 +09:00
Tonis Tiigi 7e232f5181 llb: fix relative working directory in client
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-05-21 20:46:37 -07:00
Tonis Tiigi 66488dc6d8 exec: support proxy settings
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-05-21 16:08:11 -07:00
Tonis Tiigi 2bd78c3c6e llbsolver: add support for cached mount type
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-05-15 12:24:20 -07:00
Tonis Tiigi 1b4ce4324f buildctl: add export-cache-opt flags
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-05-14 09:53:34 -07:00
Tonis Tiigi 335b1c3660 llbsolver: update for new cache variables
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-05-14 09:53:34 -07:00
Tonis Tiigi 3ca07f1467 api: allow multiple cache import refs
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 75bc38c15b client: add basic cache import test
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-05-14 09:53:34 -07:00
Tõnis Tiigi be6da00944
Merge pull request #381 from ijc/windows-tcp-dialer
client: support non-npipe server addresses on Windows
2018-05-14 09:09:23 -07:00
Ian Campbell f57186d186 client: support non-npipe server addresses on Windows
This makes `tcp://w.x.y.z:port` work from Windows based clients (perhaps
talking to a remote Linux based buildkitd or one running in a container with
Docker for Windows and TCP port forwarding).

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-05-14 15:15:08 +01:00
Tonis Tiigi b80f45955a solver: allow exporters to set data to solve results
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-05-07 20:52:11 -07:00
Tonis Tiigi 7ac9599c8f session: separate authprovider to package
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-04-17 20:36:23 -07:00
Ian Campbell ddae5a6ea4 Make llb.ReadonlyRootFS usable with common container images
e.g. with busybox image:

    OCI runtime create failed: container_linux.go:348:
    starting container process caused "process_linux.go:402:
    container init caused \"rootfs_linux.go:58:
    mounting \\\"proc\\\" to rootfs \\\"/.../rootfs\\\" at \\\"/proc\\\"
    caused \\\"mkdir /.../rootfs/proc: read-only file system\\\"\"": unknown

This is because we were setting the underlying snapshot readonly so the various
mountpoints (here /proc) cannot be created. This would not be necessary if
those mountpoints were present in images but they typically are not.

The right way to get around this (used e.g. by `ctr`) is to use a writeable
snapshot but to set root readonly in the OCI spec. In this configuration the
rootfs is writeable when mounts are processed but is then made readonly by the
runtime (runc) just before entering the user specified binary within the
container.

This involved a surprising amount of plumbing.

Use this new found ability in the dockerfile converter's `dispatchCopy`
function.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-04-03 11:04:07 +01:00
Akihiro Suda 3dd4d12796 client: disallow empty output for exportation
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-04-02 13:22:44 +09:00
Akihiro Suda 9ef8233da1 client: support passing io.WriteCloser via SolveOpt for FSSyncTargetFile
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-03-28 15:48:54 +09:00
Akihiro Suda 1cf2daae92
Merge pull request #320 from tonistiigi/contentutil
util: add contentutil helpers
2018-03-23 10:09:15 +09:00
Tonis Tiigi 0702303f6c imagemetaresolver: switch to contentutil buffer
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-03-22 16:19:56 -07:00
Ian Campbell ac6598d255 Check that mounts always have a target.
Otherwise the daemon panics when generating the OCI spec.

For belt and braces check in the ExecOp Run function but also when generating the spec.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-03-22 12:05:12 +00:00
Ian Campbell 7be9ae6954 Convert ReadonlyRootFS to a RunOption
This seems to have missed out on an update/refactor at some point and was not
usable in its previous form without duplicating the `runOptionFunc`
scaffolding.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-03-20 16:58:05 +00:00
Tonis Tiigi 432c191e81 client: speed up llb marshal
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-03-19 10:25:58 -07:00
Ian Campbell ae0293c4bf Add an integration test for pulling schema1 images
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-03-07 15:56:22 +00:00
Tonis Tiigi 23ec7e0239 client: add test for duplicate whiteouts
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-02-13 16:00:26 -08:00
Tonis Tiigi c71799dff4 client: add test for whiteout parent dirs
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-02-13 16:00:26 -08:00
Tonis Tiigi d295a16169 client: test duplicate entries in result tarballs
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-02-09 11:47:07 -08:00
Vincent Demeester 79e346f59a
Add deadcode to the linter
it tends to help keeping uneeded code out O:)

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-02-01 17:59:04 -08:00
Tonis Tiigi 6e40e83d35 Remove net/context dependencies
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-01-17 09:11:22 -08:00
Tonis Tiigi 00da260047 client: enable test for parent directories
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-01-11 17:50:15 -08:00
Tonis Tiigi b94704e55c session: fix session closing and tracing
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-01-08 18:03:06 -08:00
Tonis Tiigi 6b98dedaef Add grpc opentracing support to the binaries
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-01-08 17:49:34 -08:00
Tonis Tiigi 1e0b890dd1 client: fix tests to wait snapshots to become releasable
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-01-08 11:45:53 -08:00
Akihiro Suda 8cd775d108
Merge pull request #254 from tonistiigi/fix-create-time
exported: fix image creation time on export
2018-01-06 15:05:24 +09:00
Tonis Tiigi e0d056f418 exported: fix image creation time on export
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-01-05 10:51:32 -08:00
Tonis Tiigi b88a98bcad client: add integration tests for prune
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-01-04 23:09:05 -08:00
Tonis Tiigi 63ce643468 cache: add prune support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-01-04 23:09:05 -08:00
Tino Rusch 03f717bd32
transport: add possibility to use TLS secured transport layer on server- and clientside; 2017-12-20 13:30:46 +01:00
Akihiro Suda 84c0dd0b07 worker: add labels
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-12-20 16:28:47 +09:00
Akihiro Suda 2f2b72989c *: buildd -> buildkitd
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-12-19 13:23:27 +09:00
Tonis Tiigi 85c0f99ba0 exporter: add Docker compatible exporter
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-12-18 12:19:17 -08:00
Tonis Tiigi 2d3f36d359 source: add sharedkeyhint to local source
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-12-15 15:13:15 -08:00
Tonis Tiigi 08e1c2990c dockerfile: add dockerignore support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-12-15 15:03:35 -08:00
Tonis Tiigi 2e9f0c42f5 client: add test for OCI exporter
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-12-13 09:57:33 -08:00
Tonis Tiigi 6edccb7913 exporter: add OCI exporter
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-12-13 09:57:28 -08:00
Tonis Tiigi 7a5390f355 worker: add support for custom user
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-12-12 10:26:30 -08:00
Tonis Tiigi 40a0581853 worker: setup own resolvconf and hosts
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-12-10 18:23:24 -08:00
Akihiro Suda e15cbb0b3a
Merge pull request #196 from tonistiigi/history
image: set up history array on exported image config
2017-12-10 02:14:09 +09:00
Tonis Tiigi b74d05da9b imageresolver: fix concurrent map writes
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-12-08 21:10:25 -08:00
Tonis Tiigi f8e58e359c client: add testcase for exported history array
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-12-08 20:00:36 -08:00
Akihiro Suda 41cd660444
Merge pull request #197 from tonistiigi/test-parallel
set more tests to parallel
2017-12-09 12:59:38 +09:00
Tonis Tiigi e4f6a5e752 set more tests to parallel
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-12-08 18:19:08 -08:00
Tonis Tiigi f5f3b39228 client: add tests for differ and pushed data
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-12-08 14:37:38 -08:00
Tonis Tiigi 438c850a16 dockerfile: add original command metadata to llb
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-12-07 16:13:50 -08:00
Tonis Tiigi 303d4ccab9 llb: allow defining metadata on nodes
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-12-07 10:12:48 -08:00
Tonis Tiigi 68165c07f4 exporter: allow exporting config with no snapshots
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-12-04 23:18:09 -08:00
Tonis Tiigi e0af9d1218 source: add more properties to http source
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-12-04 12:00:46 -08:00
Tonis Tiigi 90d728e194 client: add http source integration test
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-12-02 19:52:15 -08:00
Tonis Tiigi 59628fb20f add http source
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-12-02 19:52:15 -08:00
Tonis Tiigi 2729373a03 reduce dependencies of llb package
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-11-30 17:29:57 -08:00
Tonis Tiigi e3f85cc1ac integration: detect test names with reflect
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-11-29 18:49:04 -08:00
Tonis Tiigi f343fc30ec buildctl: add sample cli test
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-11-29 18:34:43 -08:00
Tonis Tiigi e1ced023df update intergration tests for reuse
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-11-29 17:42:28 -08:00
Tonis Tiigi 51d1c4166f session: expose image auth
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-10-20 12:56:06 +02:00
Tonis Tiigi 56e1f71e6b cache: allow pushing exported cache
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-10-13 15:37:55 -07:00
Vincent Demeester 5986fa9947
Allow to use TCP for buildkit daemon and client communication
The next step is to allow TLS configuration.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-10-07 22:02:15 +02:00
Tonis Tiigi 59910481ca solver: make nested build use solverequest
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-10-05 17:51:04 -07:00
Tonis Tiigi f706b13a3f remove generateID duplicates
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-10-03 16:13:35 -07:00
Akihiro Suda f89ffc2ab4 llb: per-vertex metadata (e.g. IgnoreCache)
cache invalidation itself it not implemented yet

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-10-03 05:36:24 +00:00
Tonis Tiigi f41283caed solver: fix shared request progress and cancellation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-09-27 12:45:47 -07:00
Tonis Tiigi 05c39612d8 dockerfile: resolve to digest ref in frontend
Less hacky than keeping the cached resolver.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-09-22 15:49:37 -07:00
Tonis Tiigi fd0f7ee2a8 frontend: fix dockerfile frontend resolver
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-09-15 18:09:28 -07:00
Tonis Tiigi b36df4738a frontend: add more commands to dockerfile
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-09-15 18:09:28 -07:00
Akihiro Suda a0c9d7c690 vendor containerd v1.0.0-beta.0
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-09-09 11:13:02 +00:00
Tonis Tiigi 6d335c3c86 imagesource: share config resolver with frontend
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-09-05 13:11:27 -07:00
Akihiro Suda e1e5a8bfac Merge pull request #106 from tonistiigi/dockerfile-frontend
base of dockerfile frontend
2017-09-01 15:50:21 +09:00
Tonis Tiigi 2d290db465 frontend: base of dockerfile frontend
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-08-31 23:27:25 -07:00
Tonis Tiigi d1bd12cab2 llb: skip outputs of readonly mounts
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-08-31 10:39:40 -07:00
Tonis Tiigi 41ca1c3ce5 fix CI after containerd update
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-08-28 11:41:53 -07:00
Tonis Tiigi e5563f95a6 llb: add meta resolver from image
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-08-21 15:41:22 -07:00
Tonis Tiigi ff99df0652 llb: add cache for marshalers
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-08-09 18:23:37 -07:00
Akihiro Suda c5ba23d886 client: allow empty address for the system-default value
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-08-08 08:07:51 +00:00
Tonis Tiigi 8162e15787 llb: add support for mounting subpath or reference
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-08-07 18:45:50 -07:00
Tonis Tiigi 9f6d9a9e78 exporter: add local exporter
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-08-04 17:12:19 -07:00
Akihiro Suda 39b9dec52f Merge pull request #87 from tonistiigi/snapshot-metadata
cache: add more metadata to snapshots
2017-07-27 09:36:10 +09:00
Tõnis Tiigi 5ecab5e142 Merge pull request #11 from dmcgowan/containerd-worker
Containerd worker
2017-07-26 14:36:51 -07:00
Tonis Tiigi e3c91ee898 buildctl: add filter to buildctl df
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-07-26 11:28:26 -07:00
Tonis Tiigi 38ac00090c cache: add more metadata values to snapshots
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-07-26 11:28:20 -07:00
Derek McGowan 9ce5053a8b Update containerd version
Fix for logrus rename, use fork until fixed in moby.
Removed unused tar stream.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-07-26 11:07:45 -07:00
Tonis Tiigi 93757aef7f nested llb builds support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-07-24 18:09:16 -07:00
Tonis Tiigi e4b11deb3d llb: add missing runoptions and fixing scratch input
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-07-24 12:34:26 -07:00
Tonis Tiigi ce6a428195 rework llb package
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-07-23 16:53:09 -07:00
Tonis Tiigi 2e89d2dc72 llb: add custom types for input indexes
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-07-21 16:39:25 -07:00
Tonis Tiigi cb168bc954 source: add multiple dir support for local source
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-07-20 21:17:23 -07:00
Tonis Tiigi ff951eecd9 llb: add readonly mounts support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-07-18 16:07:37 -07:00
Tonis Tiigi eac79f7c7e cache: refactor reference reuse and caching
Replaces previous mutable.Freeze logic with
commits that can live together with mutable data.
Finalize method is added if the implementation
needs to make sure that the immutable ref is
flushed to the driver. Refs are automaitcally
finalized when writable layers are created on
top of them.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-07-18 16:01:01 -07:00
Tonis Tiigi 2e48745f57 session: remove confusing uuid variable
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-07-17 16:08:26 -07:00
Tonis Tiigi 5c2e675d18 source: add local file source fundamentals
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-07-12 23:23:20 -07:00
Akihiro Suda 6ac87fd744 support building on windows (no functional worker yet)
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-07-12 06:43:30 +00:00
Tonis Tiigi 45bfdd5e42 exporter: add image exporter
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-07-10 23:29:14 -07:00
Tonis Tiigi bf4e8c1610 llb: update runoptions signature
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-07-10 22:19:05 -07:00
Tonis Tiigi 2be8499bdc llb: add scratch support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-07-10 22:19:05 -07:00