From 7cea83cf2d6a9b8672f388a3648564f5c82514e7 Mon Sep 17 00:00:00 2001 From: vipg Date: Mon, 12 Jan 2026 09:47:16 +0800 Subject: [PATCH] add --- format_text/start.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/format_text/start.sh b/format_text/start.sh index 3846f40..b7a624c 100644 --- a/format_text/start.sh +++ b/format_text/start.sh @@ -1,3 +1,5 @@ #!/bin/sh -set -e # 遇到错误立即退出 -sudo docker run -itd --name text_format_python -v ./:/app python:3.13.7-alpine3.22 \ No newline at end of file +set -e +# 获取脚本本身所在目录的绝对路径(万能写法,无论在哪执行脚本都生效) +SCRIPT_DIR=$(cd $(dirname $0) && pwd) +sudo docker run -itd --name text_format_python -v "$SCRIPT_DIR":/app python:3.13.7-alpine3.22 \ No newline at end of file