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
Tonis Tiigi
6ce604740f
vendor: replace locker pkg for legal
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-08 11:00:37 -07:00
Tonis Tiigi
055dcb6c09
local: allow followpaths for local source
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-07 23:23:13 -07:00
Tonis Tiigi
1067c24df2
git: support all git transports
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-05-29 10:56:08 -07:00
Ian Campbell
ef1a79a1c1
Allow caller to specify platform for use with imagemetaresolver.
...
This needs to be plumbed through to `imageutil.Config` which is also used from
the `containerimage` package. Since that is used in the context of a Worker the
`platforms.Default()` (corresponding to the platform of the worker itself) is
appropriate so apply a default at that level.
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-05-24 11:23:35 +01:00
Akihiro Suda
06d81be140
Merge pull request #401 from tonistiigi/relative-wd
...
llb: fix relative working directory in client
2018-05-22 16:04:24 +09:00
Tonis Tiigi
7e232f5181
llb: fix relative working directory in client
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-05-21 20:46:37 -07:00
Tonis Tiigi
66488dc6d8
exec: support proxy settings
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-05-21 16:08:11 -07:00
Tonis Tiigi
2bd78c3c6e
llbsolver: add support for cached mount type
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-05-15 12:24:20 -07:00
Tonis Tiigi
335b1c3660
llbsolver: update for new cache variables
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-05-14 09:53:34 -07:00
Tonis Tiigi
0702303f6c
imagemetaresolver: switch to contentutil buffer
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-03-22 16:19:56 -07:00
Ian Campbell
7be9ae6954
Convert ReadonlyRootFS to a RunOption
...
This seems to have missed out on an update/refactor at some point and was not
usable in its previous form without duplicating the `runOptionFunc`
scaffolding.
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-03-20 16:58:05 +00:00
Tonis Tiigi
432c191e81
client: speed up llb marshal
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-03-19 10:25:58 -07:00
Vincent Demeester
79e346f59a
Add deadcode to the linter
...
it tends to help keeping uneeded code out O:)
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-02-01 17:59:04 -08:00
Tonis Tiigi
6e40e83d35
Remove net/context dependencies
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-01-17 09:11:22 -08:00
Tonis Tiigi
2d3f36d359
source: add sharedkeyhint to local source
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-12-15 15:13:15 -08:00
Tonis Tiigi
08e1c2990c
dockerfile: add dockerignore support
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-12-15 15:03:35 -08:00
Tonis Tiigi
7a5390f355
worker: add support for custom user
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-12-12 10:26:30 -08:00
Tonis Tiigi
b74d05da9b
imageresolver: fix concurrent map writes
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-12-08 21:10:25 -08:00
Tonis Tiigi
e4f6a5e752
set more tests to parallel
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-12-08 18:19:08 -08:00