Akihiro Suda
837b9c6214
bump up buildkit
...
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-10-05 18:33:03 +09:00
John Howard
63f9c7784b
LCOW: Log stderr on failures
...
Signed-off-by: John Howard <jhoward@microsoft.com>
2018-09-26 13:23:04 -07:00
Tibor Vass
34eede0296
Remove 'docker-' prefix for containerd and runc binaries
...
This allows to run the daemon in environments that have upstream containerd installed.
Signed-off-by: Tibor Vass <tibor@docker.com>
2018-09-24 21:49:03 +00:00
Yong Tang
fb7883e980
Merge pull request #37846 from tiborvass/buildkit-gc
...
builder: use buildkit's GC for build cache
2018-09-22 10:00:06 -07:00
Tibor Vass
4a776d0ca7
builder: use buildkit's GC for build cache
...
This allows users to configure the buildkit GC.
The following enables the default GC:
```
{
"builder": {
"gc": {
"enabled": true
}
}
}
```
The default GC policy has a simple config:
```
{
"builder": {
"gc": {
"enabled": true,
"defaultKeepStorage": "30GB"
}
}
}
```
A custom GC policy can be used instead by specifying a list of cache prune rules:
```
{
"builder": {
"gc": {
"enabled": true,
"policy": [
{"keepStorage": "512MB", "filter": ["unused-for=1400h"]]},
{"keepStorage": "30GB", "all": true}
]
}
}
}
```
Signed-off-by: Tibor Vass <tibor@docker.com>
2018-09-21 22:06:00 +00:00
Tibor Vass
d0f00bc1fb
builder: vendor buildkit to 39404586a50d1b9d0fb1c578cf0f4de7bdb7afe5
...
Signed-off-by: Tibor Vass <tibor@docker.com>
2018-09-21 20:43:26 +00:00
Anda Xu
171d51c861
add support of registry-mirrors and insecure-registries to buildkit
...
Signed-off-by: Anda Xu <anda.xu@docker.com>
2018-09-20 11:53:02 -07:00
Akihiro Suda
5adee401d1
Merge pull request #37843 from Microsoft/jjh/boltdb
...
Revendor libnetwork @ 36d3bed0e9
2018-09-14 23:22:36 +09:00
Sebastiaan van Stijn
3735ea7b76
Merge pull request #37741 from mooncak/fix_typos
...
fix typos in experimental.go and buildargs.go
2018-09-14 11:53:54 +02:00
John Howard
5c20890b9b
boltdb/bolt --> go.etcd.io/bbolt
...
Signed-off-by: John Howard <jhoward@microsoft.com>
2018-09-13 12:38:39 -07:00
Anda Xu
54b3af4c7d
update vendor
...
Signed-off-by: Anda Xu <anda.xu@docker.com>
2018-09-07 17:48:41 -07:00
Anda Xu
d52485c2f9
propagate the dockerd cgroup-parent config to buildkitd
...
Signed-off-by: Anda Xu <anda.xu@docker.com>
2018-09-07 17:48:41 -07:00
Tõnis Tiigi
4842f7a867
Merge pull request #37738 from tiborvass/remove-unused-field-in-builder
...
builder: remove unused netnsRoot field in builder-next
2018-09-06 13:33:35 -07:00
Tonis Tiigi
354c241041
builder: implement ref checker
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
2018-09-01 23:40:06 +00:00
Tibor Vass
d47435a004
builder: fix pruning all cache
...
Signed-off-by: Tibor Vass <tibor@docker.com>
2018-09-01 22:01:17 +00:00
Tibor Vass
8ff7847d1c
builder: add prune options to the API
...
Signed-off-by: Tibor Vass <tibor@docker.com>
2018-09-01 22:01:17 +00:00
mooncake
5160003b4d
fix typos
...
Signed-off-by: mooncake <xcoder@tenxcloud.com>
Signed-off-by: Bily Zhang <xcoder@tenxcloud.com>
2018-09-01 21:26:38 +08:00
Tibor Vass
8ab9e78ee4
builder: remove unused netnsRoot field in builder-next
...
Signed-off-by: Tibor Vass <tibor@docker.com>
2018-08-31 19:09:52 +00:00
Tibor Vass
dc7e472db9
builder: fix bridge networking when using buildkit
...
Signed-off-by: Tibor Vass <tibor@docker.com>
2018-08-23 05:20:01 +00:00
Tibor Vass
16084ea8c8
builder: temporarily disable bridge networking when using buildkit
...
Signed-off-by: Tibor Vass <tibor@docker.com>
2018-08-22 03:29:17 +00:00
Tibor Vass
4a40f921d3
Disable buildkit's subreaper until the issue is understood
...
Signed-off-by: Tibor Vass <tibor@docker.com>
2018-08-20 18:55:01 +00:00
Tonis Tiigi
d46fa93cb6
builder: enable add-host for buildkit
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-20 18:55:01 +00:00
Tonis Tiigi
c6c680ad5b
builder: allow setting host/none network mode
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-20 18:55:01 +00:00
Tonis Tiigi
d6424a088d
builder: setup code for a bridge networking
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-20 18:55:01 +00:00
John Stephens
8613b34a7e
Merge pull request #37659 from Microsoft/jjh/37356
...
LCOW: Mount to short container paths to avoid command-line length limit
2018-08-17 15:48:35 -07:00
Yong Tang
14d5569f19
Merge pull request #37563 from Microsoft/jjh/fix-vso17531561v2
...
LCOW: Ensure platform is populated on COPY/ADD
2018-08-17 12:51:17 -07:00
John Stephens
b3e9f7b13b
Merge pull request #35521 from salah-khan/35507
...
Add --chown flag support for ADD/COPY commands for Windows
2018-08-17 11:31:16 -07:00
Tibor Vass
7c1c8f1fe2
builder: implement PullParent option with buildkit
...
Signed-off-by: Tibor Vass <tibor@docker.com>
2018-08-17 08:40:58 +00:00
John Howard
dffc966165
LCOW: Capture stderr on external process. Log actual error rather than throwaway
...
Signed-off-by: John Howard <jhoward@microsoft.com>
2018-08-16 19:20:14 -07:00
Akihiro Suda
080c27dd13
Merge pull request #37597 from tiborvass/fix-cancel-bug
...
builder: do not cancel buildkit status request
2018-08-16 12:42:35 +09:00
Salahuddin Khan
763d839261
Add ADD/COPY --chown flag support to Windows
...
This implements chown support on Windows. Built-in accounts as well
as accounts included in the SAM database of the container are supported.
NOTE: IDPair is now named Identity and IDMappings is now named
IdentityMapping.
The following are valid examples:
ADD --chown=Guest . <some directory>
COPY --chown=Administrator . <some directory>
COPY --chown=Guests . <some directory>
COPY --chown=ContainerUser . <some directory>
On Windows an owner is only granted the permission to read the security
descriptor and read/write the discretionary access control list. This
fix also grants read/write and execute permissions to the owner.
Signed-off-by: Salahuddin Khan <salah@docker.com>
2018-08-13 21:59:11 -07:00
Tibor Vass
f1ef16c736
builder: do not cancel buildkit status request
...
This fixes a bug when the build results in an error and instead of sending
the logs of the container to the client, it signals a cancelation.
The context should not be wired to the status request, as only the
build requests need to be canceled.
Signed-off-by: Tibor Vass <tibor@docker.com>
2018-08-10 17:29:32 +00:00
Akihiro Suda
4122eb1a43
Merge pull request #37609 from seratch/fix-typos
...
Fix the several typos detected by github.com/client9/misspell
2018-08-09 08:48:05 +09:00
Kazuhiro Sera
1e49fdcafc
Fix the several typos detected by github.com/client9/misspell
...
Signed-off-by: Kazuhiro Sera <seratch@gmail.com>
2018-08-09 00:45:00 +09:00
Tibor Vass
c53d7e7104
builder: fix compilation errors after vendoring
...
Signed-off-by: Tibor Vass <tibor@docker.com>
2018-08-07 06:03:10 +00:00
John Howard
ae6b5828ce
LCOW: Ensure platform is populated on COPY/ADD
...
Signed-off-by: John Howard <jhoward@microsoft.com>
2018-07-30 12:49:33 -07:00
Tibor Vass
9ebed53c54
Merge pull request #37439 from tiborvass/vendor-buildkit
...
Set BuildKit's ExportedProduct variable to show useful errors in the future
2018-07-17 12:10:23 -07:00
Tibor Vass
81599222fc
validate: please vet
...
Signed-off-by: Tibor Vass <tibor@docker.com>
2018-07-16 21:41:54 +00:00
Tibor Vass
0ab7c1c5ba
vendor: buildkit to 98f1604134f945d48538ffca0e18662337b4a850
...
Signed-off-by: Tibor Vass <tibor@docker.com>
2018-07-16 21:41:53 +00:00
Yong Tang
492545e139
Merge pull request #37396 from yui-knk/error_when_base_name_resolved_to_blank
...
Return error if basename is expanded to blank
2018-07-15 15:42:57 -07:00
Yuichiro Kaneko
c9542d313e
Return error if basename is expanded to blank
...
Fix: https://github.com/moby/moby/issues/37325
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-15 22:29:03 +09:00
Sebastiaan van Stijn
35f7e7c50a
Fix golint issues
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-07-11 22:19:03 +02:00
Sebastiaan van Stijn
f0585d04d0
Merge pull request #37413 from yui-knk/do_not_Healthcheck_RUN_command
...
Ensure RUN instruction to run without Healthcheck
2018-07-11 20:38:03 +02:00
Tonis Tiigi
ffa7233d15
builder: fix duplicate calls to mountable
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-10 15:21:29 -07:00
Yuichiro Kaneko
44e08d8a7d
Ensure RUN instruction to run without Healthcheck
...
Before this commit Healthcheck run if HEALTHCHECK
instruction appears before RUN instruction.
By passing `withoutHealthcheck` to `copyRunConfig`,
always RUN instruction run without Healthcheck.
Fix: https://github.com/moby/moby/issues/37362
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-08 16:49:04 +09:00
Sebastiaan van Stijn
8d56fa0bb7
Merge pull request #37380 from yui-knk/update_doc_Detect
...
Update documents of `Detect`
2018-07-05 14:49:18 +02:00
Tibor Vass
b711437bbd
Merge pull request #37381 from tiborvass/api-platforms-as-string-for-temp
...
api: Change Platform field back to string (temporary workaround)
2018-07-03 17:54:42 -07:00
Tibor Vass
4b3df087a2
Merge pull request #37385 from tonistiigi/update-buildkit
...
vendor: update buildkit to 9acf51e491
2018-07-03 17:33:54 -07:00
Tibor Vass
facad55744
api: Change Platform field back to string (temporary workaround)
...
This partially reverts https://github.com/moby/moby/pull/37350
Although specs.Platform is desirable in the API, there is more work
to be done on helper functions, namely containerd's platforms.Parse
that assumes the default platform of the Go runtime.
That prevents a client to use the recommended Parse function to
retrieve a specs.Platform object.
With this change, no parsing is expected from the client.
Signed-off-by: Tibor Vass <tibor@docker.com>
2018-07-03 22:33:42 +00:00
Sebastiaan van Stijn
1da7d2eebf
Merge pull request #37368 from tiborvass/buildkit-iidfile
...
builder: return image ID in API when using buildkit
2018-07-04 00:20:25 +02:00
Tonis Tiigi
6f7dd9428e
builder: do not send duplicate status for completed jobs
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-03 14:47:38 -07:00
Tibor Vass
ca8022ec63
builder: return image ID in API when using buildkit
...
Signed-off-by: Tibor Vass <tibor@docker.com>
2018-07-03 19:11:02 +00:00
Yuichiro Kaneko
0bbd476ceb
Update documents of Detect
...
By 0296797f0f
, `progressReader`
and `remoteURL` were removed from arguments. So developers who
use `Detect` not need to care about when `ProgressReaderFunc`
is used.
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-03 09:13:25 +09:00
Yuichiro Kaneko
9b374801ac
Update documents of dispatchAdd
...
`ADD` does not support git.
Ref: https://github.com/moby/moby/issues/14704#issuecomment-298134333
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-03 08:51:07 +09:00
Sebastiaan van Stijn
1d7132e3d2
Merge pull request #37356 from Microsoft/jjh/new37316
...
LCOW: lazycontext: Use correct lstat, fix archive check
2018-06-28 12:32:31 +02:00
Tonis Tiigi
f099771665
system: add back lcow validation function
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-27 15:24:26 -07:00
Tonis Tiigi
0b50d6c315
builder: update platform support to puller
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-27 14:59:36 -07:00
Tonis Tiigi
337ba71fc1
distribution: fix passing platform struct to puller
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-27 14:59:31 -07:00
John Howard
a5aed699cf
LCOW: lazycontext: Use correct lstat, fix archive check
...
Signed-off-by: John Howard <jhoward@microsoft.com>
2018-06-27 13:29:21 -07:00
Tonis Tiigi
81f862a1fe
api: fix platform type
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-26 22:59:17 -07:00
Tonis Tiigi
48b93419dc
builder: buildkit rebase update
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-26 22:59:17 -07:00
Dennis Chen
7f334d3acf
Initial support for OCI multi-platform image
...
Add the OCI spec compatible image support in client side.
Signed-off-by: Dennis Chen <dennis.chen@arm.com>
2018-06-26 11:39:29 -07:00
John Howard
35193c0e7d
LCOW: Auto-select OS
...
Signed-off-by: John Howard <jhoward@microsoft.com>
Addresses https://github.com/moby/moby/pull/35089#issuecomment-367802698 .
This change enables the daemon to automatically select an image under LCOW
that can be used if the API doesn't specify an explicit platform.
For example:
FROM supertest2014/nyan
ADD Dockerfile /
And docker build . will download the linux image (not a multi-manifest image)
And similarly docker pull ubuntu will match linux/amd64
2018-06-26 11:37:43 -07:00
John Howard
ca3e3fcf7e
Don't fail to start daemon if builder source is not available
...
Signed-off-by: John Howard <jhoward@microsoft.com>
2018-06-13 09:33:19 -07:00
Vincent Demeester
3845728524
Update tests to use gotest.tools 👼
...
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-06-13 09:04:30 +02:00
Tonis Tiigi
8ccbc2c40a
builder: update ID of trace messages
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-10 10:05:32 -07:00
Tonis Tiigi
f41af1efd0
builder: updates for newer containerd
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-10 10:05:31 -07:00
Tonis Tiigi
0728fb2b63
builder: override history dates from ref metadata
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-10 10:05:31 -07:00
Derek McGowan
96c65a3adf
Add support for schema 1 pull
...
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2018-06-10 10:05:31 -07:00
Tonis Tiigi
577732f655
builder: more experimental/windows validation
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-10 10:05:30 -07:00
Tonis Tiigi
2567dd9afc
builder: fix cancellation context issue
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-10 10:05:30 -07:00
Tonis Tiigi
4cdb6853dc
builder: move tagging to exporter
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-10 10:05:30 -07:00
Tonis Tiigi
157b0b30db
builder: lint fixes
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-10 10:05:29 -07:00
Tonis Tiigi
9328f0479b
builder: support for images without layers
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-10 10:05:29 -07:00
Tonis Tiigi
72d10ced7d
builder: enable gateway through syntax directive
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-10 10:05:29 -07:00
Tonis Tiigi
a25846a675
builder: add support for separate upload-request
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-10 10:05:29 -07:00
Tonis Tiigi
f3ef8c93d6
builder: protect early progress writes
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-10 10:05:29 -07:00
Tibor Vass
3a1da5c534
builder: fix compiling with buildkit on windows and integration tests
...
Signed-off-by: Tibor Vass <tibor@docker.com>
2018-06-10 10:05:28 -07:00
Tonis Tiigi
92395261b0
builder: add support for building from tarball
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-10 10:05:28 -07:00
Tonis Tiigi
8900e3c758
builder: patch incomplete download handling
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-10 10:05:28 -07:00
Tonis Tiigi
ed651e796c
builder: fixes after rebase
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-10 10:05:28 -07:00
Tonis Tiigi
760ecf958b
builder: expand prune to buildkit
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-10 10:05:27 -07:00
Tonis Tiigi
f0a9e54d20
builder: add usage to snapshotter adapter
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-10 10:05:27 -07:00
Tonis Tiigi
b225258496
builder: export build cache records
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-10 10:05:27 -07:00
Tonis Tiigi
bb68c8132b
builder: produce duplicate cache keys on pull
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-10 10:05:27 -07:00
Tonis Tiigi
b7424599f6
builder: adapter update after vendor update
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-10 10:05:27 -07:00
Tonis Tiigi
46bd229b51
builder: add cache-from support to buildkit
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-10 10:05:27 -07:00
Tonis Tiigi
0bddd4ccfe
builder: add graceful cancellation endpoint
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-10 10:05:26 -07:00
Tonis Tiigi
22f7caee03
builder: experimental buildkit base
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-10 10:05:26 -07:00
Tonis Tiigi
27fa0e8a7b
builder: snapshotter and exporter
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-10 10:05:26 -07:00
Sebastiaan van Stijn
52ea99eda2
Merge pull request #37189 from arm64b/create-intermediate-for-COPY-ADD
...
Refactor and cleanup the intermediate container creation
2018-06-07 21:20:17 -07:00
Dennis Chen
7f280f6f65
Refactor and cleanup the intermediate container creation
...
This PR is trying to refactor the `probeAndCreate` and cleanup
related codes based on the refactoring.
Signed-off-by: Dennis Chen <dennis.chen@arm.com>
2018-06-04 12:55:49 +08:00
Tonis Tiigi
c9ebd2f13b
vendor: use dockerfile parser from buildkit
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-02 11:10:34 -07:00
Vincent Demeester
3e494c4b93
Merge pull request #37178 from tonistiigi/layer-leak
...
builder: fix layer leak on multi-stage wildcard copy
2018-05-31 09:39:28 +02:00
Tonis Tiigi
4a18c11bdc
builder: fix layer leak on multi-stage wildcard copy
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-05-30 15:18:40 -07:00
Sebastiaan van Stijn
2628896b5e
Handle multi-digit positional parameters
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-05-25 18:51:11 +02:00
Sebastiaan van Stijn
9654e9b6f8
Add detection of "special parameters" for substitution
...
Detect Special parameters as defined in
http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_05_02
Treat these as parameters that are not set, instead of
producing an error that a modifier is missing.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-05-25 18:20:22 +02:00
Sebastiaan van Stijn
8687a3f4b8
Add more test-cases for positional parameters
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-05-25 18:20:10 +02:00
Sebastiaan van Stijn
b80e0309d2
Add line-numbers to asserts
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-05-25 18:20:01 +02:00
Sebastiaan van Stijn
334bf3ea76
Fix detection for missing parameter in substitution
...
`${}`, `${:}` and so on are invalid because there's
no parameter within the brackets; fix detection for
this situation and add/update tests.
There were some existing test-cases that were testing
for the wrong behavior, which are now updated.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-05-25 18:19:32 +02:00