This commit is contained in:
19
.drone.yml
19
.drone.yml
@@ -4,13 +4,15 @@ name: default
|
||||
|
||||
steps:
|
||||
- name: build-and-deploy
|
||||
image: docker:20.10.16
|
||||
image: docker:20.10.16-dind
|
||||
privileged: true
|
||||
environment:
|
||||
DOCKER_HOST: unix:///var/run/docker.sock
|
||||
volumes:
|
||||
- name: docker-sock
|
||||
path: /var/run/docker.sock
|
||||
DOCKER_TLS_CERTDIR: ""
|
||||
commands:
|
||||
# Start Docker daemon
|
||||
- dockerd-entrypoint.sh &
|
||||
- sleep 10
|
||||
|
||||
# Build the Docker image
|
||||
- docker build -t localhost:5000/counter:latest .
|
||||
|
||||
@@ -30,12 +32,7 @@ steps:
|
||||
# Test the API
|
||||
- curl -f http://localhost:8080/ || exit 1
|
||||
|
||||
volumes:
|
||||
- name: docker-sock
|
||||
host:
|
||||
path: /var/run/docker.sock
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- main
|
||||
- master
|
||||
- feature/*
|
||||
Reference in New Issue
Block a user