automated_api/.drone.yml
lixin 39451d1803
Some checks reported errors
continuous-integration/drone/push Build was killed
build(automated_api): 更新 Docker 构建命令
- 在 docker build 命令中添加了构建上下文路径(.)
- 这个修改确保了 Docker 能够正确找到构建所需的文件
2025-01-10 12:40:32 +08:00

35 lines
712 B
YAML

kind: pipeline
type: docker
name: nodejs-22-docker-ci
#测试
steps:
- name: git-clone
image: alpine/git
commands:
- git clone http://120.48.5.80:3000/lixin/automated_api.git
- cd automated_api
- name: build-docker-image
image: docker:latest
volumes:
- name: docker-socket
path: /var/run/docker.sock
working_directory: automated_api
commands:
- docker build -t rz/automated_api:latest -f Dockerfile .
- name: run-container
image: docker:latest
commands:
- docker run -d -p 8001:8001 rz/automated_api:latest
volumes:
- name: docker-socket
host:
path: /var/run/docker.sock
trigger:
branch:
- main
event:
- push