Commit 234884c
Resolve PWD to pass to docker container.
In some environments, the build location may actually be a symlink
to a different filesystem, resolving the actual location may resolve
build issues related to docker containers, especially if authentication
using kernel keyrings is required.
An explicit example where this breakage occurs is in an enterprise
environment where /home/$USER may be an automount NFS share using
kerberos authentication. The user then has symlink of
/home/$USER/work -> /work/$USER
Which is a local scratch space not on the NFS share (as NFS is slow,
no one should be doing builds in NFS).
In this scenario, when /home/$USER/work/sonic-buildimage is passed to
docker as the volume to mount as /sonic it fails because from within
the container the kernel keyring with the kerberos credentials aren't
passed through and it is unable to read the symlink.
Pre-resolving the symlink before entering the container resolves the
build issue.
Signed-off-by: Brad House <[email protected]>1 parent 5844ab7 commit 234884c
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
0 commit comments