Skip to content

Commit

Permalink
Use relative paths for dockerfile and context, for docker/compose-cli…
Browse files Browse the repository at this point in the history
  • Loading branch information
rfay committed Jun 30, 2021
1 parent 53dc266 commit d2f2019
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions pkg/ddevapp/config.go
Expand Up @@ -729,10 +729,10 @@ func (app *DdevApp) RenderComposeYAML() (string, error) {
Username: username,
UID: uid,
GID: gid,
WebBuildContext: app.GetConfigPath("web-build"),
DBBuildContext: app.GetConfigPath("db-build"),
WebBuildDockerfile: app.GetConfigPath(".webimageBuild/Dockerfile"),
DBBuildDockerfile: app.GetConfigPath(".dbimageBuild/Dockerfile"),
WebBuildContext: "./web-build",
DBBuildContext: "./db-build",
WebBuildDockerfile: "../.webimageBuild/Dockerfile",
DBBuildDockerfile: "../.dbimageBuild/Dockerfile",
AutoRestartContainers: globalconfig.DdevGlobalConfig.AutoRestartContainers,
FailOnHookFail: app.FailOnHookFail || app.FailOnHookFailGlobal,
WebEnvironment: webEnvironment,
Expand Down Expand Up @@ -779,7 +779,7 @@ func (app *DdevApp) RenderComposeYAML() (string, error) {
}

// SSH agent just needs extra to add the official related user, nothing else
err = WriteBuildDockerfile(app.GetConfigPath(".sshimageBuild/Dockerfile"), "", nil, "")
err = WriteBuildDockerfile(filepath.Join(globalconfig.GetGlobalDdevDir(), ".sshimageBuild/Dockerfile"), "", nil, "")
if err != nil {
return "", err
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/ddevapp/ssh_auth.go
Expand Up @@ -100,8 +100,8 @@ func (app *DdevApp) CreateSSHAuthComposeFile() (string, error) {
return "", err
}

context := filepath.Join(globalconfig.GetGlobalDdevDir(), ".sshimageBuild")
err = WriteBuildDockerfile(filepath.Join(context, "Dockerfile"), "", nil, "")
context := "./.sshimageBuild"
err = WriteBuildDockerfile(filepath.Join(globalconfig.GetGlobalDdevDir(), context, "Dockerfile"), "", nil, "")
if err != nil {
return "", err
}
Expand Down

0 comments on commit d2f2019

Please sign in to comment.