Commit Graph

2262 Commits (75ab2b1137aa17b8330fcb4591f39b34ba7f7310)

Author SHA1 Message Date
Sebastiaan van Stijn 75ab2b1137
progress: disable truncating by default when using --progress=plain
Currently, `docker build --progress=plain` truncates output, which makes it
difficult to debug problems during build (the step that failed may not be the
cause of the failure).

For example, in the following build, the output of the `RUN echo ...` is truncated:

    DOCKER_BUILDKIT=1 docker build --no-cache --progress=plain -t foo -<<EOF
    FROM busybox
    RUN echo "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas ut lorem nec leo euismod vestibulum. Donec tortor nisl, iaculis at vehicula vel, interdum eu orci. Integer velit lacus, congue id magna eu, mollis accumsan augue. Aliquam non venenatis risus, eu posuere libero. Vestibulum ante ipsum primis in faucibus orci luctus." > /somewhere
    RUN echo "something went wrong"; exit 1
    EOF

    #5 [2/3] RUN echo "Lorem ipsum dolor sit amet, consectetur adipiscing elit....
    #5 DONE 0.2s

    #6 [3/3] RUN echo "something went wrong"; exit 1
    #6 0.211 something went wrong
    #6 ERROR: executor failed running [/bin/sh -c echo "something went wrong"; exit 1]: runc did not terminate sucessfully
    ------
     > [3/3] RUN echo "something went wrong"; exit 1:
    ------
    failed to solve with frontend dockerfile.v0: failed to build LLB: executor failed running [/bin/sh -c echo "something went wrong"; exit 1]: runc did not terminate sucessfully

While there is an existing `PROGRESS_NO_TRUNC` environment variable, I think that
this should be the default if the user opted to use `--progress=plain` (or in
situations where no TTY is attached, which could be in CI).

This patch changes the default to disable truncating in those situations, but
allowing users to opt-out by setting `PROGRESS_NO_TRUNC=0`

With this change the same build looks like this:

    #5 [2/3] RUN echo "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas ut lorem nec leo euismod vestibulum. Donec tortor nisl, iaculis at vehicula vel, interdum eu orci. Integer velit lacus, congue id magna eu, mollis accumsan augue. Aliquam non venenatis risus, eu posuere libero. Vestibulum ante ipsum primis in faucibus orci luctus." > /somewhere
    #5 sha256:b2f0f47d63911ee55e7cf17c81007310e28190b5be84aa1a7869ba90786d5cee
    #5 DONE 0.2s

    #6 [3/3] RUN echo "something went wrong"; exit 1
    #6 sha256:c037b34bb998ae7d30572b489286da14df87e1478adf6d0c5c71c79b84b11bcc
    #6 0.293 something went wrong
    #6 ERROR: executor failed running [/bin/sh -c echo "something went wrong"; exit 1]: runc did not terminate sucessfully
    ------
     > [3/3] RUN echo "something went wrong"; exit 1:
    ------
    failed to solve with frontend dockerfile.v0: failed to build LLB: executor failed running [/bin/sh -c echo "something went wrong"; exit 1]: runc did not terminate sucessfully

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-09 17:52:01 +02:00
Tõnis Tiigi 226a5db9ad
Merge pull request #1433 from hinshun/session-hijack
Allow sessions to hijack the connection outside of a solve
2020-04-08 20:25:28 -07:00
Edgar Lee d42b8bfc10 Set single export entry outside of session initialization
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-04-08 14:07:35 -07:00
Edgar Lee 423f5f8a97 Allow sessions to hijack the connection outside of a solve
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-04-08 12:13:42 -07:00
Tõnis Tiigi c44cb42a69
Merge pull request #1428 from tonistiigi/imagemeta-async
llb: update image meta resolver to async callback
2020-04-06 10:00:42 -07:00
Tõnis Tiigi 177703c925
Merge pull request #1429 from tonistiigi/stateoptions
llb: make generic runoptions stateoptions
2020-04-06 09:51:27 -07:00
Akihiro Suda 4201939551
Merge pull request #1420 from fuweid/disable-http2-for-https
resolver: disable http2 for pushing
2020-04-06 20:41:53 +09:00
Tonis Tiigi 0ef961eb87 llb: make generic runoptions stateoptions
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-05 22:30:58 -07:00
Tonis Tiigi 146ef63e4a llb: update image meta resolver to async callback
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-05 22:25:02 -07:00
Akihiro Suda 195f9e598c
Merge pull request #1426 from tonistiigi/llb-async
llb: asyncronous llb graph generation support
2020-04-05 07:07:38 +09:00
Tonis Tiigi 1a9d366b49 llb: asyncronous llb graph generation support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-03 14:55:10 -07:00
Akihiro Suda 6f28b0d70b
Merge pull request #1424 from tonistiigi/buildctl-test
travis: make sure buildctl integration tests run
2020-04-02 17:13:07 +09:00
Tonis Tiigi c2dd099570 travis: make sure buildctl integration tests run
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-01 17:19:54 -07:00
Wei Fu 9f063f6b61 resolver: disable http2 for pushing
The golang net/http package uses http2 client to serve https by default,
if let Transport.TLSNextProto is nil. And net/http package doesn't
provide tunnable value for http2 flow control which will limit push
performance.

Before this commit, use GODEBUG="http2debug=1" buildkitd to pushing
one image from dockerfile like

```
$ about 700MB
FROM scratch
ADD ./golang-1.13.0-stretch.tar.gzip /
```

and use ifstat to monitor network interface and found that

```
$ ifstat -i enp0s3
      enp0s3
 KB/s in  KB/s out
    0.47      0.67
    0.44      0.51
   19.72     11.56
   62.25   2184.41
   96.34   3514.28
   93.89   3508.31
   95.41   3515.53
   91.61   3433.22
   95.82   3579.68
   90.36   3388.89
   93.64   3513.03
   93.32   3478.04
   ...

$ log from buildkitd
2020/03/31 17:40:33 http2: Transport received WINDOW_UPDATE stream=11 len=4 incr=32768
2020/03/31 17:40:33 http2: Transport received WINDOW_UPDATE len=4 (conn) incr=271
2020/03/31 17:40:33 http2: Transport received WINDOW_UPDATE stream=11 len=4 incr=271
2020/03/31 17:40:33 http2: Transport received WINDOW_UPDATE len=4 (conn) incr=32496
2020/03/31 17:40:33 http2: Transport received WINDOW_UPDATE stream=11 len=4 incr=32496
...
```

The registry will update window size of flow control when receives each
frame data. The sender need wait for receiver update the window size if
the sender runs out of buffer of flow control. But the increase value
for buffer by WINDOW_UPDATE frame is too small and slow which impacts
push performance.

Before net/http package provides tunnable value for flow control, we
should disable http2 for https request.

And with this commit, the performance will be better like:

```
$ ifstat -i enp0s3
      enp0s3
 KB/s in  KB/s out
    0.56      0.61
   16.13      5.55
   18.89      9.23
  218.84   7832.80
  338.56  13074.04
  302.39  11713.83
  231.62   8964.60
  356.50  13504.02
  298.14  11401.81
  311.24  11783.26
  333.01  12710.17
  329.64  12630.40
  305.87  11662.04
  292.53  11118.04
```

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2020-03-31 17:59:13 +08:00
Tõnis Tiigi 6e725bdbb6
Merge pull request #1418 from XiaofanZhang/xiaofan/update-vendor
vendor: update fsutil to c2c7d7b0e144 and symlink test
2020-03-30 21:15:15 -07:00
Xiaofan Zhang 0947ed31ea vendor: update fsutil to c2c7d7b0e144 and symlink test
Signed-off-by: Xiaofan Zhang <xiaofan.zhang@clinc.com>
2020-03-31 02:59:34 +00:00
Tõnis Tiigi d13c5afeda
Merge pull request #1416 from vladaionescu/master
Add --force flag in git fetch command
2020-03-30 00:07:38 -07:00
Tõnis Tiigi ba043f338f
Merge pull request #1415 from aluzzardi/dockerfile-frontendinputs-forward
dockerfile: forward FrontendInputs to the gateway
2020-03-30 00:06:57 -07:00
Vlad A. Ionescu cd4a80c086 Add comment about the use of --force
Signed-off-by: Vlad A. Ionescu <vladaionescu@users.noreply.github.com>
2020-03-27 18:35:18 -07:00
Vlad A. Ionescu 4ce2075095 Add --force flag in git fetch command
Signed-off-by: Vlad A. Ionescu <vladaionescu@users.noreply.github.com>
2020-03-27 18:06:49 -07:00
Andrea Luzzardi e7150dcfef dockerfile: forward FrontendInputs to the gateway
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2020-03-26 17:38:12 -07:00
Tibor Vass c60a1eb215
Merge pull request #1413 from tonistiigi/fix-loadwithparents
solver: avoid looping over same keys in loadwithparents
2020-03-25 13:43:00 -07:00
Tonis Tiigi cfabf3009b solver: avoid looping over same keys in loadwithparents
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-03-18 17:07:57 -07:00
Tõnis Tiigi 60f7453734
Merge pull request #1405 from AkihiroSuda/dockerfile-cross
Dockerfile: cross-compile fuse-overlayfs and idmap
2020-03-18 12:22:26 -07:00
Akihiro Suda 7190882c81
Merge pull request #1410 from tonistiigi/self-signed-tls
resolver: support self signed certificates
2020-03-19 02:41:39 +09:00
Akihiro Suda 60c56c2a35 Dockerfile: cross-compile fuse-overlayfs and idmap
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-03-18 02:15:53 +09:00
Tonis Tiigi 56f76a5621 resolver: support self signed certificates
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-03-16 22:09:27 -07:00
Akihiro Suda 430c5256d5
Merge pull request #1408 from dweomer/typo-in-buildkitd-cli-arg-handling
buildkitd: fix containerd-cni-config-path typo
2020-03-14 02:37:18 +09:00
Darren Shepherd 6cc8a72665 fix containerd-cni-config-path typo
Signed-off-by: Jacob Blain Christen <jacob@rancher.com>
2020-03-13 09:39:55 -07:00
Akihiro Suda a1bf12f806
Merge pull request #1303 from jingxiaolu/README_inline_cache
README.md: update description of inline cache use for output
2020-03-13 04:45:08 +09:00
Tõnis Tiigi b9ef26d15f
Merge pull request #1403 from Container-Projects/master
optimization debian package manager tweaks
2020-03-11 17:34:11 -07:00
Pratik Raj 2910de68b1 optimization debian package manager tweaks
By default, Ubuntu or Debian based "apt" or "apt-get" system installs recommended but not suggested packages .

By passing "--no-install-recommends" option, the user lets apt-get know not to consider recommended packages as a dependency to install.

This results in smaller downloads and installation of packages .

Refer to blog at [Ubuntu Blog](https://ubuntu.com/blog/we-reduced-our-docker-images-by-60-with-no-install-recommends) .

Signed-off-by: Pratik Raj <rajpratik71@gmail.com>
2020-03-11 15:27:54 +05:30
Akihiro Suda d36226a67e
Merge pull request #1404 from tonistiigi/rc-tagging
hack: allow rc releases without overwriting latest tags
2020-03-11 16:46:37 +09:00
Akihiro Suda b659d4f880
Merge pull request #1392 from AkihiroSuda/rootless-fix-buildplatform
Dockerfile: put fuse3 to rootless-base-internal
2020-03-11 16:41:59 +09:00
Akihiro Suda ccc689a87d Dockerfile: update tonistiigi/buildkit:rootless-base
https://github.com/moby/buildkit/pull/1392#issuecomment-597478241

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-03-11 16:12:27 +09:00
Tonis Tiigi c7f3036629 hack: allow rc releases without overwriting latest tags
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-03-10 23:04:38 -07:00
Akihiro Suda dc70bca748 Dockerfile: put fuse3 to rootless-base-internal
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-03-11 15:02:54 +09:00
Akihiro Suda b42528249a
Merge pull request #1295 from zabio3/bugfix/issue1242
support specifying a custom tag using --import-cache type=local
2020-03-11 13:10:22 +09:00
Akihiro Suda 0a08ab277f
Merge pull request #1397 from tonistiigi/registryhosts
resolver: update to new registryhosts based config
2020-03-11 13:08:50 +09:00
Tõnis Tiigi 40fd572f1a
Merge pull request #1400 from AkihiroSuda/rootless-move-out-of-experimental
rootless: graduate from experimental
2020-03-10 20:53:45 -07:00
Tõnis Tiigi 960494c95a
Merge pull request #1401 from AkihiroSuda/update-f31-inst
README.md: update Fedora 31 instruction
2020-03-10 20:51:54 -07:00
Tõnis Tiigi 943caea53a
Merge pull request #1399 from AkihiroSuda/rootlesskit-v091
update RootlessKit to v0.9.1
2020-03-10 20:51:13 -07:00
Akihiro Suda 9584b6e05b README.md: update Fedora 31 instruction
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-03-10 19:06:12 +09:00
Akihiro Suda 8b56fac46b rootless: graduate from experimental
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-03-10 12:04:53 +09:00
l00397676 8244958486 README.md: update description of inline cache use for output
Fix #1294

Signed-off-by: Lu Jingxiao <lujingxiao@huawei.com>
2020-03-10 09:59:23 +08:00
Akihiro Suda 436cd1e5da update RootlessKit to v0.9.1
Notable change: RootlessKit now prints warnings when the sysctl preconditions are not satisfied.

https://github.com/rootless-containers/rootlesskit/pull/122

https://github.com/rootless-containers/rootlesskit/releases

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-03-09 23:23:49 +09:00
zabio3 6f3a6e72d4 fix readme
https://github.com/moby/buildkit/issues/1242

Signed-off-by: Tomohiro Kusumoto <zabio1192@gmail.com>
2020-03-07 08:58:10 +09: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
Tõnis Tiigi a276ba731c
Merge pull request #1393 from tonistiigi/xattr-hash
contenthash: ignore system and security xattrs in calculation
2020-03-04 11:44:38 -08:00
Tonis Tiigi 81e711302a contenthash: ignore system and security xattrs in calculation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-03-03 19:37:28 -08:00