
Some checks reported errors
continuous-integration/drone/push Build encountered an error
- 移除了多余的空行和注释 - 保留了代码拉取、Docker 镜像构建和容器运行的基本步骤
32 lines
697 B
YAML
32 lines
697 B
YAML
kind: pipeline
|
|
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
|
|
- 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 |