Tonis Tiigi
cec6dae19d
dockerfile: add test for default shell and path
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-10-24 11:12:15 -07:00
Tonis Tiigi
ecf070a027
exec: use platform specific default path
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-10-23 15:30:23 -07:00
Lu Jingxiao
5e7ae230b2
Add hostname specifying for building
...
Fix : #1301
Signed-off-by: Lu Jingxiao <lujingxiao@huawei.com>
2020-10-14 14:45:36 +08:00
Tonis Tiigi
6b145fa964
client: avoid checking token cap on default case
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-09-16 19:29:06 -07:00
Erik Sipsma
3b418db323
llb: Cache DefinitionOp inputs to support memoization during Marshal
...
llb.State.Marshal uses a vertexCache map (keyed by the llb.Vertex interface
value) to memoize which vertexes it has already visited while marshalling.
However, before this change, llb.DefinitionOp was constructing new pointers for
each value in the return slice of Inputs(), which meant that each input had a
different key in the vertexCache (due to being different pointer values). This
meant no memoization actually occured. I noticed this while using
llb.DefinitionOp with a fairly large graph when my program crashed after using
>16GB of RSS during a call to llb.State.Marshal.
The fix here avoids changing vertexCache as that would impact many other
vertex implementations. Instead, just DefinitionOp.Inputs() is updated to cache
the pointers it creates and pass that cache to its descendents. This fix
resulted in the program that was previously crashing out-of-memory to run
without any perceivable increase in RSS.
Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2020-08-10 17:23:04 -07:00
Paul "TBBle" Hampson
b126501d78
Provide the known default PATH to the llbtest test
...
The existing test fails because the Windows default PATH (as far as LLB
knows) is empty. See the system.DefaultPathEnv comments.
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-28 18:07:20 +10:00
Tonis Tiigi
5da4a40ae8
lint: enable more linters
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-19 09:28:36 -07:00
Tonis Tiigi
c8190b1518
lint: enable golint
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-19 09:28:24 -07:00
Tonis Tiigi
57a88b0afb
lint: add misspell and unused
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-18 08:13:57 -07:00
Tonis Tiigi
49de675234
git: support for token authentication
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-06-16 17:00:06 -07:00
Cory Bennett
e351bfdd01
add unit test for getmount output index
...
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-06-04 18:25:03 -07:00
Cory Bennett
2b462fc6ca
skip tmpfs mounts when calculating indexes for llb.GetMount
...
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-06-04 10:54:32 -07:00
Edgar Lee
7c81e16b8a
Fix duplicate source maps and fix issue preventing multiple locations per source map
...
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-05-20 18:48:20 -07:00
Edgar Lee
59fa9fc9a0
Allow multiple source locations to be added as a constraint
...
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-05-20 16:48:44 -07:00
Edgar Lee
7a90a36b46
Support multiple source maps and locations for source-level stacktraces
...
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-05-20 16:17:35 -07:00
Tonis Tiigi
90c5e67496
client: add source mapping tests
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-05-19 17:22:14 -07:00
Tonis Tiigi
6073e6cff3
llb: enable source tracking
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-05-18 15:50:03 -07:00
Tonis Tiigi
1f9599aba3
llb: move source mapping to llb metadata
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-05-18 15:49:41 -07:00
Tonis Tiigi
37b8832d00
upgrade errors checks to Is()
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-18 22:53:38 -07:00
Edgar Lee
8ff11ce5c0
Protect defop map when marshalling concurrently
...
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-04-10 16:22:08 -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
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
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
Edgar Lee
5ec7bc7713
Change FrontendInputs in backend API definitions to *pb.Definition
...
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-02-24 14:38:01 -08:00
Edgar Lee
b027a8572d
Fix terminating op with non-zero output index, i.e. AddMount as final vertex
...
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-02-24 14:38:01 -08:00
Edgar Lee
7e0f923181
Implement CapFrontendInput to pass llb.States to frontends
...
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-02-24 14:38:01 -08:00
Edgar Lee
f937656b1a
Verify platform is stored in state directly in defop test
...
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-01-23 11:02:40 -08:00
Edgar Lee
0a76749067
Add platform defop test, force renames in copy tests, and move forwarded solve test to dockerfile package
...
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-01-23 11:02:40 -08:00
Edgar Lee
be7f1a36fa
Return def bytes instead of remarshalling definition from pb.Op
...
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-01-23 11:02:40 -08:00
Edgar Lee
2edb431a0f
Allow previous solve results to be used in new solves
...
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-01-23 11:02:40 -08:00
Tonis Tiigi
1ef979a7bb
llb: fix excessive formatting
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-07-01 16:55:08 -07:00
Tonis Tiigi
d72c19071a
imageutil: use leases on fetching config
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-05-28 14:39:05 -07:00
Tonis Tiigi
d106163985
llb: fix security mode cap check
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-27 08:57:36 -07:00
Tonis Tiigi
15ef4e2b8a
dockerfile: allow content cache for rw mounts
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-02 19:40:30 -07:00
Kunal Kushwaha
a2bbb5ff39
security entitlement support
...
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2019-03-27 13:57:03 +09:00
Tonis Tiigi
210679d35f
client: set cap if fileop used
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-18 16:35:30 -07:00
Tonis Tiigi
0d17ac323e
fileop: updates with new fsutil copy pkg
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-15 17:49:58 -07:00
Tonis Tiigi
8a4674bab4
fileop: add dockerfile support
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-15 17:49:50 -07:00
Tonis Tiigi
81a5fa5a2e
llbsolver: fileop implementation
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-15 16:22:35 -07:00
Tonis Tiigi
a443cfff05
fileop: resolve review comments
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-15 16:22:35 -07:00
Tonis Tiigi
89e6614b38
solver: change uid to uint
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-15 16:22:35 -07:00
Tonis Tiigi
431d11dda3
llb: add timestamp override to fileop
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-15 16:22:35 -07:00
Tonis Tiigi
5b4841f308
llb: initial fileop implementation
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-15 16:22:01 -07:00
Tonis Tiigi
c0371c908f
client: avoid string formatting on custom vertex names
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-01-22 15:35:39 -08:00
Ian Campbell
f9a436599a
client/llb: factor out `State.WithImageConfig` from `Image`.
...
Currently if a caller wants an `Image` (with config applied) and the
corresponding config (e.g. to use a base image and tailor the config to return
as `exptypes.ExporterImageConfigKey` in the build result) then they have to
`ResolveImageConfig` and then `llb.Image(..., llb.WithMetaResolver)`, which
ends up resolving the config twice.
Pulling this code out allows them to instead to the `config := ResolveImageConfig()`
once and to then do `llb.Image(...).WithImageConfig(config)`.
This is only really necessary if you want to run things in the image context
(and thus want the config applied) as part of tailoring the config before
returning the image and config. If you aren't running things on that `Image` as
part of the build then it doesn't matter if the config isn't applied to the
`Image` and `ResolveImageConfig` + `Image(...)` (without a metaresolver) is
fine.
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-10-18 10:06:00 +01:00
Tõnis Tiigi
c9dc8352a4
Merge pull request #656 from AkihiroSuda/cap-ssh
...
define CapMountSSH
2018-10-02 23:21:17 -07:00
Akihiro Suda
758a267235
s/CapMount/CapExecMount/g
...
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-10-03 15:03:36 +09:00
Akihiro Suda
f542300a10
client/llb: fix cap marshalling
...
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-10-03 15:02:08 +09:00
Akihiro Suda
900a1b96c4
define CapMountSSH
...
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-10-03 15:00:10 +09:00