From e34f7247ec328c92ceb72876eafb84719128374d Mon Sep 17 00:00:00 2001 From: hsc Date: Mon, 7 Apr 2025 17:58:46 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=B7=BB=E5=8A=A0=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=97=A0=E5=85=B3=E6=96=87=E4=BB=B6=E7=9A=84=20.gitignore=20?= =?UTF-8?q?=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 忽略 Maven 构建目录 /target - 忽略 IntelliJ IDEA 项目配置文件 /.idea- 忽略未定义日志路径文件 /log.path_IS_UNDEFINED- 忽略临时文件目录 /tmp --- .drone.yml | 2 +- hello.sh | 16 ++++------------ 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/.drone.yml b/.drone.yml index 4556b7d..b94dcf7 100644 --- a/.drone.yml +++ b/.drone.yml @@ -4,7 +4,7 @@ name: default steps: - name: run-hello-script - image: docker.1ms.run/alpine:latest # 必须指定基础镜像(如alpine/bash) + image: docker.1ms.run/docker:latest # 必须指定基础镜像(如alpine/bash) commands: - chmod +x ./hello.sh - ./hello.sh diff --git a/hello.sh b/hello.sh index 9903b0c..e5967d4 100644 --- a/hello.sh +++ b/hello.sh @@ -1,15 +1,7 @@ -# 定义变量 -NAME="芒星DevOps指挥脚本" -VERSION="alpine" +docker --version -# 输出欢迎信息 -echo "Welcome To ${NAME} : Version ${VERSION}" +docker ps -# 其他功能示例 -# 检查当前目录 -CURRENT_DIR=$(pwd) -echo "当前目录是: ${CURRENT_DIR}" +docker pull hello-world -# 列出当前目录下的文件 -echo "当前目录下的文件有:" -ls -l \ No newline at end of file +docker run hello-world \ No newline at end of file