This commit is contained in:
@ -2,10 +2,14 @@ kind: pipeline
|
||||
type: docker
|
||||
name: default
|
||||
|
||||
services:
|
||||
- name: docker
|
||||
image: docker:dind
|
||||
privileged: true
|
||||
|
||||
steps:
|
||||
- name: 打包 Docker 容器
|
||||
image: docker:latest
|
||||
privileged: true
|
||||
environment:
|
||||
DOCKER_TAG: ${DRONE_COMMIT_SHA:0:8}
|
||||
DOCKER_USERNAME:
|
||||
@ -23,7 +27,6 @@ steps:
|
||||
|
||||
- name: 清理累赘的 Docker 镜像
|
||||
image: docker:latest
|
||||
privileged: true
|
||||
commands:
|
||||
- docker rmi "$DOCKER_REGISTRY/your-org/your-app:$DOCKER_TAG"
|
||||
- docker rmi "$DOCKER_REGISTRY/your-org/your-app:latest"
|
||||
@ -34,4 +37,4 @@ steps:
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- push
|
||||
- push
|
||||
|
||||
Reference in New Issue
Block a user