Commit Graph

281 Commits (785436a312230fcc79b41aa044c1643528c91913)

Author SHA1 Message Date
Akihiro Suda 809b9a4602
Merge pull request #568 from tonistiigi/multi-platform
dockerfile: allow multi-target external builds
2018-08-10 00:09:35 +09:00
Tonis Tiigi fa83e55b21 dockerfile: allow multi-target external builds
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-08 18:42:43 -07:00
Tonis Tiigi 5e6729e56f dockerfile: implement secret type mounts
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-08 18:12:16 -07:00
Tonis Tiigi f8b0573edb dockerfile: expose add-hosts
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-03 13:56:14 -07:00
Tonis Tiigi 04a5cc81e8 dockerfile: add platform prefixes
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-31 10:41:36 -07:00
Tonis Tiigi d0aafaefd0 dockerfile: add stage prefixes
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-31 10:41:36 -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 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 b966096ab5 dockerfile: allow setting image resolve mode
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-25 18:23:59 -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 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 6be1257f5d export: manifest list support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-25 16:01:12 -07:00
Tonis Tiigi 8c065401f2 exporter: reuse exptypes constants
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-25 16:01:12 -07:00
Tonis Tiigi 69bb8e8a15 dockerfile: allow automatic platform variables
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-25 16:01:05 -07:00
Tonis Tiigi 33f4382b69 dockerfile: support exporting multiple platforms
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-25 14:37:01 -07:00
Tonis Tiigi 0d6b052c97 dockerfile: add test for incremental copy regression
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-24 23:28:55 -07:00
Yuichiro Kaneko 08a5847eff Split resolving platform codes to `buildPlatformOpt`
This will make it easy to test these functions.

Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-24 08:46:32 +09:00
Yuichiro Kaneko 85987b10ee Rename `toEnvList` to `toEnvMap`
Because `toEnvList` was changed to return map.

Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-21 08:30:47 +09:00
Yuichiro Kaneko 80e2176450 Omit needless argument `override`
It always called with `override = true`.

Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-20 19:46:50 +09:00
Yuichiro Kaneko 936aa64061 Use `ProcessWord(s)WithMap` to avoid string contatination and string split
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-20 19:41:15 +09:00
Yuichiro Kaneko 5b70c51b7d Add test cases for `toEnvList`
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-20 19:31:43 +09:00
Yuichiro Kaneko 75118c8a82 Add Map version `ProcessWords`
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-20 19:01:31 +09:00
Tibor Vass 71e3c24df1
Merge pull request #517 from tonistiigi/llb-caps
llb: add caps support
2018-07-19 17:21:50 -07:00
Yuichiro Kaneko 83dc829222 Extract parsing logic of "key=val" as `parseKeyValue`
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-19 21:36:07 +09:00
Tõnis Tiigi db8b382274
Merge pull request #518 from yui-knk/add_test_for_addEnv
Add test cases for `addEnv` which is a bit complicated function
2018-07-18 22:41:39 -07:00
Akihiro Suda 1be4a5891d
Merge pull request #516 from yui-knk/update_comment_Parse
Add a description about metaArgs return value
2018-07-19 12:16:37 +09:00
Yuichiro Kaneko f79f28cf83 Add test cases for `addEnv` which is a bit complicated function
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-19 09:39:22 +09:00
Tonis Tiigi c8cb8127c3 gateway: validate LLB capabilities
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-18 17:22:30 -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
Yuichiro Kaneko 93e3b15854 `s/docker file/Dockerfile/`
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-19 07:38:58 +09:00
Yuichiro Kaneko ee15340993 Add a description about metaArgs return value
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-18 22:32:15 +09:00
Yuichiro Kaneko fb499edc5b Omit needless argument `commit` from `dispatchEnv`
Always `dispatchEnv` is called `commit` with `true`.

Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-18 21:38:37 +09:00
Yuichiro Kaneko 5838f9e763 Simplify `State` setup
On this code `dispatchEnv` is called with `commit = false`,
so this call do these 2 things

* `AddEnv` to `d.state`
* `addEnv` to update `d.image.Config.Env`

But updating `d.image.Config.Env` has no effect on `d.image.Config.Env`
because this is in for-loop of `range d.image.Config.Env`.

Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-18 21:29:55 +09:00
Yuichiro Kaneko c9038a2f5d Use `ProcessWordWithMap` in simple cases
In the case when the second argument of `toEnvList` is `nil`,
we can use `ProcessWordWithMap` and avoid string contatination
and string split.

Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-18 08:54:18 +09:00
Yuichiro Kaneko 8715fbf6bf Add string map version ProcessWord to Lex
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-16 17:49:28 +09:00
Yuichiro Kaneko 6583105db9 Use strings map instead of slice of string in `shellWord`
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-16 17:46:28 +09:00
Tonis Tiigi 303b5da713 llbsolver: use result type with multi ref support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-12 17:52:23 -07:00
Tonis Tiigi c3a29cce8b gateway: implementation for return
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-12 17:51:44 -07:00
Tonis Tiigi 95d944cc31 gateway: use return in grpcclient
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-12 17:51:44 -07:00
Tonis Tiigi 01b7a29e86 gateway: return result from solve
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-12 17:51:44 -07:00
Tonis Tiigi 9684362cb0 frontend: move forwarder under gateway
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-12 17:50:19 -07:00
Tonis Tiigi d9f1a1d99f gateway: expose buildopts and result
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-12 17:50:19 -07:00
Tonis Tiigi 30601fb7e5 gateway: fix product env passing
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-12 16:04:58 -07:00
Tonis Tiigi bdf391a67d dockerfile: test for snapshot leak
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-11 16:21:32 -07:00
Tonis Tiigi ddf3f3e59c frontend: fix two data races
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-10 19:31:33 -07:00
Tõnis Tiigi f4694ee01b
Merge pull request #488 from yui-knk/stop_create_ArgCommand
Use simple `keyValuePair` to `dispatchOpt.metaArgs` and `dispatchState.buildArgs`
2018-07-10 08:02:21 -07:00
Yuichiro Kaneko c641b43e4a Use simple `KeyValuePairOptional` to `dispatchOpt.metaArgs` and `dispatchState.buildArgs`
`KeyValuePairOptional` is enough in this case. We can avoid create `ArgCommand` out of Parser
 by replacing them with `KeyValuePairOptional`.

Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-10 19:24:43 +09:00
Tonis Tiigi d5c9d39128 apicaps: set exportedproduct from binary
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-09 16:32:39 -07:00
Tonis Tiigi c8fa75ffc1 dockerfile: read default build platform from workers
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-09 16:32:39 -07:00