
Some checks failed
continuous-integration/drone/push Build is failing
- 将 Docker 重启策略从 automated 改为 unless-stopped - 使用 latest 标签替代 tag - 优化 Docker 命令格式
29 lines
538 B
YAML
29 lines
538 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 unless-stopped automated-api:latest
|
|
|
|
trigger:
|
|
branch:
|
|
- main
|
|
- master
|
|
|
|
volumes:
|
|
- name: docker
|
|
host:
|
|
path: /var/run/docker.sock |