From 8f2a100c31943aae8d83bb604cb136ac82ed70cd Mon Sep 17 00:00:00 2001 From: lixin Date: Fri, 10 Jan 2025 12:27:08 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E7=AE=80=E5=8C=96=20Drone=20CI=20?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除了多余的空行和注释 - 保留了代码拉取、Docker 镜像构建和容器运行的基本步骤 --- .drone.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.drone.yml b/.drone.yml index f8e212c..7e69784 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,14 +3,11 @@ type: docker name: nodejs-22-docker-ci steps: - # 拉取代码 - name: clone image: alpine/git commands: - git clone http://120.48.5.80:3000/lixin/automated_api.git - cd automated_api - - # 构建 Docker 镜像(使用当前文件夹下的 Dockerfile) - name: build-docker-image image: docker:latest volumes: @@ -19,13 +16,10 @@ steps: working-directory: automated_api commands: - docker build -t rz/automated_api:latest -f Dockerfile. - - # 运行容器(这里简单在本地运行,可按需调整为远程部署等,示例中假设容器内应用监听3000端口,映射到主机3000端口) - name: run-container image: docker:latest commands: - docker run -d -p 8001:8001 rz/automated_api:latest - volumes: - name: docker-socket host: