Skip to content

[18.09 backport] builder / buildkit updates - #1438

Merged
tiborvass merged 4 commits into
docker:18.09from
thaJeztah:18.09_backport_hide-buildkit-flags-if-not-enabled
Oct 11, 2018
Merged

[18.09 backport] builder / buildkit updates#1438
tiborvass merged 4 commits into
docker:18.09from
thaJeztah:18.09_backport_hide-buildkit-flags-if-not-enabled

Conversation

@thaJeztah

@thaJeztahthaJeztah commented Oct 11, 2018

Copy link
Copy Markdown
Member

backport of #1419, #1427, and some commits from #1393 for 18.09

git checkout -b 18.09_backport_hide-buildkit-flags-if-not-enabled upstream/18.09
git cherry-pick -s -S -x 8cfd24049f108cbe9c722acefe4c53988de5d66d
git cherry-pick -s -S -x 846c38cbd710c64fcbfd1876cfd90368bb46acde
git cherry-pick -s -S -x db7399a016bed833205a17129ed80fad4d15e48d
git cherry-pick -s -S -x bbd01fe3df1fd83aed57a8ba46c8f6e9e3976269

Took the buildkit-bump commit from #1393, but left out the other bumps

@thaJeztah

thaJeztah commented Oct 11, 2018

Copy link
Copy Markdown
MemberAuthor

ping @tiborvass@tonistiigi PTAL (assuming this was intended to the 18.09 branch as well)

Also; #1419 won't be in 18.09, correct? (Otherwise it's better to cherry-pick that one before this one)

discussed with @tiborvass and we also need the buildkit updates from that PR, so included #1419

@codecov-io

codecov-io commented Oct 11, 2018

Copy link
Copy Markdown

Codecov Report

Merging #1438 into 18.09 will decrease coverage by 0.07%.
The diff coverage is 16.98%.

@@ Coverage Diff @@## 18.09 #1438 +/- ##
==========================================
- Coverage 54.13% 54.05% -0.08% 
==========================================
Files 290 290 Lines 19344 19385 +41 ==========================================
+ Hits 10472 10479 +7 - Misses 8203 8237 +34 
Partials 669 669

@thaJeztahthaJeztah changed the title [18.09 backport] build: only show buildkit-specific flags if buildkit is enabled[18.09 backport] builder / buildkit updatesOct 11, 2018
@thaJeztah
thaJeztahforce-pushed the 18.09_backport_hide-buildkit-flags-if-not-enabled branch from 7e3829c to 840ce44CompareOctober 11, 2018 17:54

@tiborvasstiborvass left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah

This comment has been minimized.

@thaJeztah
thaJeztahforce-pushed the 18.09_backport_hide-buildkit-flags-if-not-enabled branch from 840ce44 to 745134dCompareOctober 11, 2018 18:51
@thaJeztah

Copy link
Copy Markdown
MemberAuthor

Fixed the vendoring issues; looks like we didn't include some vendoring bumps in the 18.09 branch; adding those both made the cherry-pick clean, and brought the expected versions

thaJeztahand others added 4 commits October 12, 2018 00:16
…7afe5
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 8cfd240)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
(cherry picked from commit 846c38c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
…D=$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 db7399a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit bbd01fe)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
thaJeztahforce-pushed the 18.09_backport_hide-buildkit-flags-if-not-enabled branch from 745134d to 3dfacb5CompareOctober 11, 2018 22:16
@tiborvass
tiborvass merged commit 39f1110 into docker:18.09Oct 11, 2018
@thaJeztah
thaJeztah deleted the 18.09_backport_hide-buildkit-flags-if-not-enabled branch October 11, 2018 23:02
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@thaJeztah@codecov-io@tonistiigi@tiborvass@GordonTheTurtle@AkihiroSuda