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
Akihiro Suda
fa92effc4b
dockerfile: add support for RUN --mount=type=ssh
...
* Needs to be compiled with `dfrunmount dfssh`
* Implemented options:
* `type`(required): needs to be `ssh`
* `target`(optional): the socket path in the container
* `id`(optional): id
Test script:
#!/bin/bash
set -exu -o pipefail
REF=localhost:5000/dfssh:latest
ssh-add -l
sudo buildctl build --frontend=dockerfile.v0 --local context=. --local dockerfile=frontend/dockerfile/cmd/dockerfile-frontend \
--frontend-opt "build-arg:BUILDTAGS=dfrunmount dfssh" \
--exporter=image --exporter-opt name=$REF --exporter-opt push=true
mkdir -p /tmp/foo
cd /tmp/foo
cat << EOF > Dockerfile
# syntax=$REF
FROM alpine
RUN apk add --no-cache openssh-client
RUN mkdir -p -m 0700 ~/.ssh && ssh-keyscan gitlab.com >> ~/.ssh/known_hosts
RUN --mount=type=ssh ssh git@gitlab.com
# "Welcome to GitLab, @GITLAB_USERNAME_ASSOCIATED_WITH_SSHKEY" should be printed here
EOF
sudo buildctl build --ssh default=$SSH_AUTH_SOCK --progress=plain --frontend=dockerfile.v0 --local context=. --local dockerfile=.
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-10-03 14:53:43 +09:00
Ian Campbell
720d8327e2
Push setting of default PATH down into the executor(s)
...
Setting the default `PATH` in the `llb.State` on the client side means it
depends on the `GOOS` of the buildkit client, rather than of the environment
where it will actually execute.
Instead defer this to execution time and insert the default PATH at that point
if one is not present. Doing this in solver/llbsolver/ops/exec covers all
executors and also avoids breaking the cache.
Client compatibility is handled via a new capability.
Fixes #604
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-09-28 14:16:47 +01:00
Ian Campbell
6e773ab708
Add `SetDefault` to `EnvList`
...
This sets an envvar only if it is not already set.
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-09-28 13:42:35 +01:00
Tonis Tiigi
f6e104da5f
gateway: allow access to apicaps
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-09-21 15:33:41 -07:00
Tonis Tiigi
0940cdc6fe
update golint comments
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-09-18 22:06:47 -07:00
Akihiro Suda
bf571a519e
update Go to 1.11
...
For consistency with Moby (moby/moby#37358 )
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-09-15 14:25:11 +09:00
Tonis Tiigi
6888956557
sshforward: implement ssh socket forwarding
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-09-07 08:57:06 -07:00
Kunal Kushwaha
98c1f44151
function name fixed SetMarhalDefaults -> SetMarshalDefaults
...
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2018-09-06 13:28:39 +09:00
Tonis Tiigi
130f5f5ab0
solver: net host with basic entitlements support
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-09 14:03:35 -07:00
Tonis Tiigi
f7359f7093
llb: add extrahost support
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-03 13:56:13 -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
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
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
a3b5d22419
llb: add resolvemode to image source
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-25 18:20:04 -07:00
Tonis Tiigi
378df8cbaa
llb: add secrets support
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-19 22:02:11 -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
Tonis Tiigi
c9df92f4c5
imagemetaresolver: use platform in cache
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-17 18:36:32 -07:00
Tonis Tiigi
1456a3f165
llb: don't fill platform on static sources
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-16 15:27:03 -07:00
Tonis Tiigi
40e270a2e6
llb: set unique ID to local sources without session
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-09 16:27:12 -07:00
Tonis Tiigi
e618878451
dockerfile: platform support
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-25 11:06:08 -07:00
Tonis Tiigi
f9383c48a3
source: image source platform support
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-25 10:39:17 -07:00
Tonis Tiigi
242697af59
llb: add marshal roundtrip tests for platform
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-22 17:55:36 -07:00
Tonis Tiigi
d34e4c68b5
llb: automatically carry platform with state chain
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-22 16:49:03 -07:00
Tonis Tiigi
dc9de85069
llb: force platform in llb and allow constraints
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-22 16:49:03 -07:00
Tonis Tiigi
ccbf185006
llbsolver: allow sharing modes for cache mounts
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-19 15:57:20 -07:00
Akihiro Suda
f381aaac05
Merge pull request #445 from tonistiigi/tmpfs
...
llbsolver: add support for tmpfs mounts to exec
2018-06-09 11:52:16 +09:00
Tonis Tiigi
596b03a8a0
llbsolver: allow tmpfs mounts
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-08 13:05:14 -07:00