mirror of
https://github.com/docker/compose.git
synced 2025-07-24 06:04:57 +02:00
resolve Dockerfile symlink but file name
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
7cf7c6414f
commit
69f1430a49
@ -436,9 +436,10 @@ func dockerFilePath(ctxName string, dockerfile string) string {
|
||||
if !filepath.IsAbs(dockerfile) {
|
||||
dockerfile = filepath.Join(ctxName, dockerfile)
|
||||
}
|
||||
symlinks, err := filepath.EvalSymlinks(dockerfile)
|
||||
dir := filepath.Dir(dockerfile)
|
||||
symlinks, err := filepath.EvalSymlinks(dir)
|
||||
if err == nil {
|
||||
return symlinks
|
||||
return filepath.Join(symlinks, filepath.Base(dockerfile))
|
||||
}
|
||||
return dockerfile
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user