
Some checks failed
continuous-integration/drone/push Build is failing
- 移除了文件开头的中文注释 - 调整了步骤缩进,使其更加规范 - 删除了多余的空行,优化了文件结构
36 lines
799 B
YAML
36 lines
799 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
|
|
volumes:
|
|
- name: docker-socket
|
|
path: /var/run/docker.sock
|
|
commands:
|
|
- echo "Checking Docker version"
|
|
- docker version
|
|
- echo "Running container"
|
|
- docker run -d -p 8001:8001 rz/automated_api:latest
|
|
|
|
trigger:
|
|
branch:
|
|
- main
|
|
event:
|
|
- push |