DockerCLI/vendor/github.com
Akihiro Suda e942084530
build: add SSH agent socket forwarder (`docker build --ssh $SSHMOUNTID=$SSH_AUTH_SOCK`)
Unlike `docker build --secret`, `docker build --ssh` allows the build container to
use SSH keys with passphrases.

  $ eval $(ssh-agent)
  $ ssh-add ~/.ssh/id_rsa
  (Input your passphrase here)
  $ docker build --ssh default=$SSH_AUTH_SOCK ...

This feature requires the daemon with `CapExecMountSSH` build capability (moby/moby#37973) .

Currently, the official Dockerfile frontend does not provide the syntax for using the SSH forwarder.

However, the experimental `RUN --mount=type=ssh` syntax can be enabled by using
the Dockerfile frontend image built with the `BUILDTAGS="dfrunmount dfssh"`, via the `# syntax =` "shebang".

The Dockerfile for the Dockerfile frontend is available at  github.com/moby/buildkit/frontend/dockerfile/cmd/dockerfile-frontend)
The pre-built image is also available as `tonistiigi/dockerfile:ssh20181002` .

An example Dockerfile with `RUN --mount=type=ssh`:

  # syntax = tonistiigi/dockerfile:ssh20181002
  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 | tee /hello
  # "Welcome to GitLab, @GITLAB_USERNAME_ASSOCIATED_WITH_SSHKEY" should be printed here

More info available at moby/buildkit#608, moby/buildkit#655

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
(cherry picked from commit db7399a016)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-10-12 00:16:42 +02:00
..
Azure/go-ansiterm Bump moby to 1ffa10ee2630917e4f2a88f5e4daf34d700eaa1f 2017-10-12 01:01:48 +02:00
Microsoft vndr docker/docker to docker/engine d2ecc7b 2018-09-05 17:35:51 +00:00
Nvveen/Gotty Add vendor 2017-04-17 18:12:58 -04:00
agl/ed25519 Bump some dependencies to more recent versions (and tagged if available) 2018-07-25 14:16:41 +02:00
asaskevich/govalidator Vendoring bump for containerd and licensing 2018-08-20 09:42:05 -07:00
beorn7/perks Bump some dependencies to more recent versions (and tagged if available) 2018-07-25 14:16:41 +02:00
containerd Fix vendoring glitch 2018-09-21 13:16:34 -07:00
coreos/etcd Bump some dependencies to more recent versions (and tagged if available) 2018-07-25 14:16:41 +02:00
cpuguy83/go-md2man Bump cpuguy83/go-md2man to v1.0.8 2018-02-12 12:01:20 -08:00
davecgh/go-spew Add vendor 2017-04-17 18:12:58 -04:00
dgrijalva/jwt-go Vendoring bump for containerd and licensing 2018-08-20 09:42:05 -07:00
docker Vendor bump of licensing lib 2018-09-28 20:50:43 +00:00
flynn-archive/go-shlex Add vendor 2017-04-17 18:12:58 -04:00
ghodss/yaml Add support for kubernetes in docker cli 2017-12-26 11:22:32 +01:00
gogo vndr docker/docker to docker/engine d2ecc7b 2018-09-05 17:35:51 +00:00
golang Bump some dependencies to more recent versions (and tagged if available) 2018-07-25 14:16:41 +02:00
google Bump some dependencies to more recent versions (and tagged if available) 2018-07-25 14:16:41 +02:00
googleapis/gnostic Bump some dependencies to more recent versions (and tagged if available) 2018-07-25 14:16:41 +02:00
gorilla Bump some dependencies to more recent versions (and tagged if available) 2018-07-25 14:16:41 +02:00
gregjones/httpcache Bump some dependencies to more recent versions (and tagged if available) 2018-07-25 14:16:41 +02:00
grpc-ecosystem Bump moby version (and its dependencies) 2018-06-08 11:26:10 +02:00
hashicorp Vendoring bump for containerd and licensing 2018-08-20 09:42:05 -07:00
imdario/mergo Bump mergo to v0.3.6 2018-07-31 09:57:56 +02:00
inconshreveable/mousetrap Add vendor 2017-04-17 18:12:58 -04:00
json-iterator/go Bump kubernetes dependencies to 1.11 2018-07-25 11:34:59 +02:00
mattn/go-shellwords Add vendor 2017-04-17 18:12:58 -04:00
matttproud/golang_protobuf_extensions Bump moby to d37f5c6bdf788a6cb82c07fb707e31a240eff5f9 2018-05-18 11:44:14 +02:00
miekg/pkcs11 Bump some dependencies to more recent versions (and tagged if available) 2018-07-25 14:16:41 +02:00
mitchellh/mapstructure Bump some dependencies to more recent versions (and tagged if available) 2018-07-25 14:16:41 +02:00
moby/buildkit build: add SSH agent socket forwarder (`docker build --ssh $SSHMOUNTID=$SSH_AUTH_SOCK`) 2018-10-12 00:16:42 +02:00
modern-go Bump kubernetes dependencies to 1.11 2018-07-25 11:34:59 +02:00
morikuni/aec Vendoring for stack watch status and testing 2018-05-24 16:43:04 +02:00
opencontainers Vendoring bump for containerd and licensing 2018-08-20 09:42:05 -07:00
opentracing/opentracing-go Bump moby version (and its dependencies) 2018-06-08 11:26:10 +02:00
peterbourgon/diskv Add support for kubernetes in docker cli 2017-12-26 11:22:32 +01:00
pkg/errors Add vendor 2017-04-17 18:12:58 -04:00
prometheus Bump moby to d37f5c6bdf788a6cb82c07fb707e31a240eff5f9 2018-05-18 11:44:14 +02:00
russross/blackfriday Add missing dependencies to vendor, and fix generation imports 2017-06-02 11:12:43 -04:00
satori/go.uuid Vendoring bump for containerd and licensing 2018-08-20 09:42:05 -07:00
shurcooL/sanitized_anchor_name Add missing dependencies to vendor, and fix generation imports 2017-06-02 11:12:43 -04:00
sirupsen/logrus Bump some dependencies to more recent versions (and tagged if available) 2018-07-25 14:16:41 +02:00
spf13 Global Default Address Pool feature support 2018-08-21 14:34:00 -04:00
syndtr/gocapability Vendoring bump for containerd and licensing 2018-08-20 09:42:05 -07:00
theupdateframework/notary Update Notary vendor to 0.6.1 2018-04-11 14:10:52 +01:00
tonistiigi bump up buildkit 2018-10-12 00:16:38 +02:00
xeipuuv Bump some dependencies to more recent versions (and tagged if available) 2018-07-25 14:16:41 +02:00