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