Fix build context (#1411)

This commit is contained in:
Lex Cao
2021-08-11 09:43:42 +08:00
committed by GitHub
parent b605fd986c
commit ef474809e3
4 changed files with 41 additions and 6 deletions
+2 -1
View File
@@ -262,8 +262,9 @@ func BuildDockerImage(service kobject.ServiceConfig, name string) error {
log.Debug("Build image working dir is: ", wd)
log.Debug("Build image service build is: ", service.Build)
// Get the appropriate image source and name
imagePath := path.Join(wd, path.Base(service.Build))
imagePath := service.Build
if !path.IsAbs(service.Build) {
imagePath = path.Join(wd, service.Build)
}