From 07357d69d7a6e841def10a2bbf516003ab93c8bc Mon Sep 17 00:00:00 2001 From: Justin Chadwell Date: Tue, 16 Aug 2022 12:48:26 +0100 Subject: [PATCH] docs: add bind mount output info to dockerfile->llb docs Signed-off-by: Justin Chadwell --- docs/dev/dockerfile-llb.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/dev/dockerfile-llb.md b/docs/dev/dockerfile-llb.md index 00ba3890837b..1df0c853fc3d 100644 --- a/docs/dev/dockerfile-llb.md +++ b/docs/dev/dockerfile-llb.md @@ -157,14 +157,18 @@ your local state, which is specified through the `llb.Local` state object: llb.FollowPaths([]string{"."}), ) - st = st.Dir("/builder").Run( + execState = st.Dir("/builder").Run( llb.Shlex("pip install ."), llb.AddEnv( "PIP_INDEX_URL", "https://my-proxy.com/pypi", ), - llb.AddMount("/builder", localState) - ).Root() + ) + _ := execState.AddMount("/builder", localState) + // the return value of AddMount captures the resulting state of the mount + // after the exec operation has completed + + st := execState.Root() ``` ## Cache mounts