Commit Graph

64 Commits

Author SHA1 Message Date
ea7e1c4aaa builder: fix duplicate mount release
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 2732fe527f9258561c7310c128914b4b456c8404)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5853cd510c3272755ca5d6605ca8039d54a5ba15
Component: engine
2018-10-24 20:11:51 +02:00
5521475b61 builder: fix private pulls on buildkit
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit c693d45acf74b87680ace0db8615f97bd6853598)
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: fdaf08a57b2348623f33e0b9855c488421fc7bf6
Component: engine
2018-10-17 17:54:13 -07:00
2e2a73446a Switch copy image to a docker org based one
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 5cfd110c306d6a370307178b84d2b98d8598acc4)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 7b54720ccbfa5d8242e896f27e8b36ee58612401
Component: engine
2018-10-05 18:01:10 +00:00
b48ad13f28 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>
(cherry picked from commit 34eede0296bce6a9c335cb429f10728ae3f4252d)
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: b3bb2aabb8ed5a8af0a9f48fb5aba3f39af38e0d
Component: engine
2018-09-24 22:35:36 +00:00
f3dec68e23 builder: vendor buildkit to 39404586a50d1b9d0fb1c578cf0f4de7bdb7afe5
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit d0f00bc1fb2c349ad72ecc2394b8474937de84dd)
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 3d67dd046539f8e04db82ce07ea56f97b832676b
Component: engine
2018-09-21 17:06:25 -07:00
4f76283213 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>
(cherry picked from commit 4a776d0ca76c4bdf4399aef8c102361d6c2819eb)
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 73e2f72a7c5bd6d6f8306e0ffe4371e1c3b00a21
Component: engine
2018-09-21 17:06:25 -07:00
dc48089436 add support of registry-mirrors and insecure-registries to buildkit
Signed-off-by: Anda Xu <anda.xu@docker.com>
(cherry picked from commit 171d51c861b479af8798fbe7c51906bcecdffea0)
(cherry picked from commit a72752b2f74467333b4ebe21c6c474eb0c2b99e0)
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 2926a45be6b9315d2ddeec27d1193278b6bbae91
Component: engine
2018-09-21 17:06:25 -07:00
ff79736ce2 vendor: update bolt to bbolt
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: b501aa82d5151b8af73d6670772cc4e8ba94765f
Component: engine
2018-09-21 17:06:25 -07:00
97c18c02cb create newBuildKit function separately in daemon_unix.go and daemon_windows.go for cross platform build
Signed-off-by: Anda Xu <anda.xu@docker.com>
(cherry picked from commit 66ac92cdc65be350ec53f1de51052374846dfe24)
Upstream-commit: a5d731edecc75927f602c7f15e5ba9f5f77d3655
Component: engine
2018-09-18 11:19:51 -07:00
15caa5031e update vendor
Signed-off-by: Anda Xu <anda.xu@docker.com>
(cherry picked from commit 54b3af4c7d7d625b9cff6d5d7b8730ec99f38977)
Upstream-commit: ee40a9ebcda2f46ea731ac1e2f840a2a23be0a07
Component: engine
2018-09-13 16:42:13 -07:00
d0654cc902 propagate the dockerd cgroup-parent config to buildkitd
Signed-off-by: Anda Xu <anda.xu@docker.com>
(cherry picked from commit d52485c2f901e62e9a26445e230ec3f6662fa276)
Upstream-commit: e8620110fcbfca840e91bfb06348da8d9fd53e2e
Component: engine
2018-09-13 16:36:57 -07:00
d448ca1e85 builder: implement ref checker
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 354c241041ec67d4c500cccfda476dc73435d38e)
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 28150fc70cc0688c63d27879bf1c701ade47caff
Component: engine
2018-09-04 15:02:28 +00:00
e376b78cb5 builder: fix pruning all cache
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit d47435a004e36531a594cd2636dddaff61a5f4d0)
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: d2c316364225cd6bdf1581d11f370e0d159ad362
Component: engine
2018-09-04 15:02:28 +00:00
5a73ccd4a8 builder: add prune options to the API
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 8ff7847d1cf0f156b8a7cf1450aa944ef636c747)
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 3153708f13ceefc3e8e4d4a93778dcc9e4347f5a
Component: engine
2018-09-04 15:02:28 +00:00
cb322aa233 builder: fix bridge networking when using buildkit
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit dc7e472db986fa3c07806f56e82db756c47567fb)
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 1d531ff64f99e07ac8733894416de8212a6c7278
Component: engine
2018-08-23 05:32:51 +00:00
ebad0ccbe4 builder: temporarily disable bridge networking when using buildkit
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 16084ea8c82fe3b3a0aae2573def0d1857365408
Component: engine
2018-08-22 03:29:17 +00:00
0f3d3cb192 Disable buildkit's subreaper until the issue is understood
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 4a40f921d3c73b056271bad128f9da7d90b1cd2a
Component: engine
2018-08-20 18:55:01 +00:00
0a604d1631 builder: enable add-host for buildkit
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: d46fa93cb637e7de964769717f3b5770f6732bee
Component: engine
2018-08-20 18:55:01 +00:00
4020288a72 builder: allow setting host/none network mode
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: c6c680ad5b1e4d17faaebc753e1123d8662ad297
Component: engine
2018-08-20 18:55:01 +00:00
3214172ab1 builder: setup code for a bridge networking
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: d6424a088dacc902b674f402e6a62aa8f5f4a803
Component: engine
2018-08-20 18:55:01 +00:00
fbda033233 builder: implement PullParent option with buildkit
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 7c1c8f1fe29c28ef62017d99a99eb1ec6be4513c
Component: engine
2018-08-17 08:40:58 +00:00
2418c55ad0 Merge pull request #37597 from tiborvass/fix-cancel-bug
builder: do not cancel buildkit status request
Upstream-commit: 080c27dd1374d9be2e3e53bcffe62d7bb3ec0a3b
Component: engine
2018-08-16 12:42:35 +09:00
16b520e100 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>
Upstream-commit: f1ef16c736b477be17f6bc1bce18d0958a87d840
Component: engine
2018-08-10 17:29:32 +00:00
b552588bbc Merge pull request #37609 from seratch/fix-typos
Fix the several typos detected by github.com/client9/misspell
Upstream-commit: 4122eb1a43a42c4c8b827b4d0fb3d6543f9f2c91
Component: engine
2018-08-09 08:48:05 +09:00
71a3e53c36 Fix the several typos detected by github.com/client9/misspell
Signed-off-by: Kazuhiro Sera <seratch@gmail.com>
Upstream-commit: 1e49fdcafc6601cd9dd5c46551ee283baa0272ef
Component: engine
2018-08-09 00:45:00 +09:00
a3a5617ab6 builder: fix compilation errors after vendoring
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: c53d7e71046581775a8888706c0fd6baddb81a0b
Component: engine
2018-08-07 06:03:10 +00:00
1244bbdf28 Merge pull request #37439 from tiborvass/vendor-buildkit
Set BuildKit's ExportedProduct variable to show useful errors in the future
Upstream-commit: 9ebed53c5431a7c8296107869f1b3feabee9e8f3
Component: engine
2018-07-17 12:10:23 -07:00
3b5e16f319 validate: please vet
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 81599222fc8f8a845b68ca15f3582e76de24a7b3
Component: engine
2018-07-16 21:41:54 +00:00
adc3470981 vendor: buildkit to 98f1604134f945d48538ffca0e18662337b4a850
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 0ab7c1c5bacdf8b18c66b729bb7f919f6acfcf29
Component: engine
2018-07-16 21:41:53 +00:00
d799a9b46d Fix golint issues
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 35f7e7c50a131494c9d530800e80bf2da42fb89c
Component: engine
2018-07-11 22:19:03 +02:00
4c7a4e64a3 builder: fix duplicate calls to mountable
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: ffa7233d1538363fe12ad609e720b8d75e8768de
Component: engine
2018-07-10 15:21:29 -07:00
6f30c64548 Merge pull request #37381 from tiborvass/api-platforms-as-string-for-temp
api: Change Platform field back to string (temporary workaround)
Upstream-commit: b711437bbd8596312c962d4189e9ad4d2108c2dc
Component: engine
2018-07-03 17:54:42 -07:00
32dfa10dbf Merge pull request #37385 from tonistiigi/update-buildkit
vendor: update buildkit to 9acf51e491
Upstream-commit: 4b3df087a222fa34d771137b02348c51d9e107bc
Component: engine
2018-07-03 17:33:54 -07:00
6283fee6a2 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>
Upstream-commit: facad557440a0c955beb615495b8d0175f25e4e3
Component: engine
2018-07-03 22:33:42 +00:00
642a920980 builder: do not send duplicate status for completed jobs
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 6f7dd9428e2134239467815c51aaab85756adb11
Component: engine
2018-07-03 14:47:38 -07:00
2a9011606f builder: return image ID in API when using buildkit
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: ca8022ec63a9d0e2f9660e2a3455d821abf8f517
Component: engine
2018-07-03 19:11:02 +00:00
c377af1d4d builder: update platform support to puller
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 0b50d6c315a41025de98617bd6cc79c3925838d5
Component: engine
2018-06-27 14:59:36 -07:00
23cd5508d9 builder: buildkit rebase update
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 48b93419dcc3dc71584d674f045c30793b890395
Component: engine
2018-06-26 22:59:17 -07:00
89a8d08125 Don't fail to start daemon if builder source is not available
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: ca3e3fcf7e66554d20acd990a506d6ee5e368ca1
Component: engine
2018-06-13 09:33:19 -07:00
ed25213177 builder: update ID of trace messages
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 8ccbc2c40a063dbd4251b684ded1573d99ded337
Component: engine
2018-06-10 10:05:32 -07:00
ea746c1733 builder: updates for newer containerd
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: f41af1efd04ae054fea70c8999112b6dfd4dcf72
Component: engine
2018-06-10 10:05:31 -07:00
d3f78ce983 builder: override history dates from ref metadata
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 0728fb2b6395bd52524a1e5c134a1b37848a9c56
Component: engine
2018-06-10 10:05:31 -07:00
bfaba7aa6b Add support for schema 1 pull
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: 96c65a3adf95bc2d972123036d6b81ea3432af33
Component: engine
2018-06-10 10:05:31 -07:00
d75f0ca946 builder: more experimental/windows validation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 577732f655fc95396b8c2b9a45747c5c95760755
Component: engine
2018-06-10 10:05:30 -07:00
8a84262fd3 builder: fix cancellation context issue
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 2567dd9afc070428082aa1bec14ee037337dd5c4
Component: engine
2018-06-10 10:05:30 -07:00
b29ae02ee8 builder: move tagging to exporter
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 4cdb6853dcf7105bc355370dac7246d9061e23ee
Component: engine
2018-06-10 10:05:30 -07:00
e7c54d5a63 builder: lint fixes
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 157b0b30dbf2f5af5c5b121bee60c1951af71fb5
Component: engine
2018-06-10 10:05:29 -07:00
f872f0f30d builder: support for images without layers
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 9328f0479b810c76fd5944bf9c856cea1af0c498
Component: engine
2018-06-10 10:05:29 -07:00
629c647dcf builder: enable gateway through syntax directive
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 72d10ced7dfd013be91347e92723bbbf62539765
Component: engine
2018-06-10 10:05:29 -07:00
1a41f07112 builder: add support for separate upload-request
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: a25846a67527b2a8de5159608979fc7ff9d70bdf
Component: engine
2018-06-10 10:05:29 -07:00