Skip to content

Commit 9b23aa9

Browse files
authored
Merge pull request #3180 from Dokploy/2835-existing-env-file-is-overwritten-when-using-docker-builder
refactor(docker): remove unused environment file command generation a…
2 parents 4210eef + dbc1396 commit 9b23aa9

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

packages/server/src/utils/builders/docker-file.ts

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
getDockerContextPath,
99
} from "../filesystem/directory";
1010
import type { ApplicationNested } from ".";
11-
import { createEnvFileCommand } from "./utils";
1211

1312
export const getDockerCommand = (application: ApplicationNested) => {
1413
const {
@@ -68,21 +67,7 @@ export const getDockerCommand = (application: ApplicationNested) => {
6867
commandArgs.push("--secret", `type=env,id=${key}`);
6968
}
7069

71-
/*
72-
Do not generate an environment file when publishDirectory is specified,
73-
as it could be publicly exposed.
74-
*/
75-
let command = "";
76-
if (!publishDirectory) {
77-
command += createEnvFileCommand(
78-
dockerFilePath,
79-
env,
80-
application.environment.project.env,
81-
application.environment.env,
82-
);
83-
}
84-
85-
command += `
70+
const command = `
8671
echo "Building ${appName}" ;
8772
cd ${dockerContextPath} || {
8873
echo "❌ The path ${dockerContextPath} does not exist" ;

0 commit comments

Comments
 (0)