fix/docker-context-path-default: Placeholder with name attribute "dockerContextPath" lied that the default path is ".", while being the Dockerfile directory.

This commit is contained in:
drago1520
2026-08-31 09:39:00 +03:00
parent cabfe2e81e
commit f1e2467bb9
2 changed files with 7 additions and 9 deletions
@@ -26,11 +26,7 @@ export const getDockerCommand = (application: ApplicationNested) => {
try {
const image = `${appName}`;
const defaultContextPath =
dockerFilePath.substring(0, dockerFilePath.lastIndexOf("/") + 1) || ".";
const dockerContextPath =
getDockerContextPath(application) || defaultContextPath;
const dockerContextPath = getDockerContextPath(application);
const commandArgs = ["build", "-t", image, "-f", dockerFilePath, "."];
@@ -138,8 +138,10 @@ export const getDockerContextPath = (application: Application) => {
const { APPLICATIONS_PATH } = paths(!!application.serverId);
const { appName, dockerContextPath } = application;
if (!dockerContextPath) {
return null;
}
return path.join(APPLICATIONS_PATH, appName, "code", dockerContextPath);
return path.join(
APPLICATIONS_PATH,
appName,
"code",
dockerContextPath || ".",
);
};