
Some checks failed
continuous-integration/drone/push Build is failing
- 在 .drone.yml 文件中添加了 docker-run-step 步骤 - 使用 plugins/docker 插件运行 Docker 容器 - 启动一个名为 automated-api 的容器,映射端口 8001,并设置重启策略
29 lines
520 B
YAML
29 lines
520 B
YAML
kind: pipeline
|
|
type: docker
|
|
name: default
|
|
|
|
steps:
|
|
- name: build
|
|
image: plugins/docker
|
|
settings:
|
|
dockerfile: Dockerfile
|
|
dry_run: true
|
|
repo: automated-api
|
|
tags:
|
|
- latest
|
|
mirror: https://docker.1panelproxy.com
|
|
|
|
- name: docker-run-step
|
|
image: plugins/docker
|
|
commands:
|
|
- docker run -d -p 8001:8001 --name automated-api --restart automated-api:tag
|
|
trigger:
|
|
branch:
|
|
- main
|
|
- master
|
|
|
|
volumes:
|
|
- name: docker
|
|
host:
|
|
path: /var/run/docker.sock
|