2020-08-19 20:04:37 +00:00
|
|
|
---
|
|
|
|
version: '3'
|
|
|
|
|
|
|
|
services:
|
|
|
|
dockron:
|
|
|
|
build:
|
|
|
|
context: ../
|
|
|
|
dockerfile: ./Dockerfile.multi-stage
|
|
|
|
command: ["-watch", "10s", "-debug"]
|
|
|
|
volumes:
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
2024-09-26 19:42:58 +00:00
|
|
|
environment:
|
|
|
|
DOCKER_API_VERSION: 1.45
|
2020-08-19 20:04:37 +00:00
|
|
|
|
|
|
|
start_echoer:
|
|
|
|
image: busybox:latest
|
|
|
|
command: sh -c "echo ok | tee -a /result.txt"
|
|
|
|
volumes:
|
|
|
|
- "./start_result.txt:/result.txt"
|
|
|
|
labels:
|
|
|
|
# Execute every minute
|
|
|
|
- 'dockron.schedule=* * * * *'
|
|
|
|
|
|
|
|
exec_echoer:
|
|
|
|
image: busybox:latest
|
|
|
|
command: sh -c "tail -f /result.txt"
|
|
|
|
volumes:
|
|
|
|
- "./exec_result.txt:/result.txt"
|
|
|
|
labels:
|
|
|
|
# Execute every minute
|
|
|
|
- 'dockron.test.schedule=* * * * *'
|
2024-09-26 18:48:11 +00:00
|
|
|
- 'dockron.test.command=echo ok | tee /result.txt && echo "Yay!"'
|