Merge pull request #5231 from drago1520/fix/docker-context-path-default

fix/docker-context-path-default: Placeholder with name attribute "doc…
This commit is contained in:
Mauricio Siu 2026-09-02 00:29:37 -06:00 committed by GitHub
commit e67d9efb38
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 9 deletions

View File

@ -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, "."];

View File

@ -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 || ".",
);
};