From c76cc07c1cb4868342b06c1c551a8f046094aaca Mon Sep 17 00:00:00 2001 From: zhengkunwang223 <31820853+zhengkunwang223@users.noreply.github.com> Date: Sun, 25 Jun 2023 22:00:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=20Docker=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E8=BF=87=E4=BD=8E=E5=AF=BC=E8=87=B4=E5=BA=94=E7=94=A8?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E6=93=8D=E4=BD=9C=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20(#1446)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs https://github.com/1Panel-dev/1Panel/issues/1445 --- backend/utils/compose/compose.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/utils/compose/compose.go b/backend/utils/compose/compose.go index 9262fe776..022c68525 100644 --- a/backend/utils/compose/compose.go +++ b/backend/utils/compose/compose.go @@ -5,31 +5,31 @@ import ( ) func Up(filePath string) (string, error) { - stdout, err := cmd.Execf("docker compose -f %s up -d", filePath) + stdout, err := cmd.Execf("docker-compose -f %s up -d", filePath) return stdout, err } func Down(filePath string) (string, error) { - stdout, err := cmd.Execf("docker compose -f %s down --remove-orphans", filePath) + stdout, err := cmd.Execf("docker-compose -f %s down --remove-orphans", filePath) return stdout, err } func Start(filePath string) (string, error) { - stdout, err := cmd.Execf("docker compose -f %s start", filePath) + stdout, err := cmd.Execf("docker-compose -f %s start", filePath) return stdout, err } func Stop(filePath string) (string, error) { - stdout, err := cmd.Execf("docker compose -f %s stop", filePath) + stdout, err := cmd.Execf("docker-compose -f %s stop", filePath) return stdout, err } func Restart(filePath string) (string, error) { - stdout, err := cmd.Execf("docker compose -f %s restart", filePath) + stdout, err := cmd.Execf("docker-compose -f %s restart", filePath) return stdout, err } func Operate(filePath, operation string) (string, error) { - stdout, err := cmd.Execf("docker compose -f %s %s", filePath, operation) + stdout, err := cmd.Execf("docker-compose -f %s %s", filePath, operation) return stdout, err }