Simple scheduling for short-running Docker containers https://blog.iamthefij.com/2018/11/19/introducing-dockron-scheduling/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
578 B

  1. ---
  2. version: '3'
  3. services:
  4. dockron:
  5. build:
  6. context: .
  7. dockerfile: ./Dockerfile.multi-stage
  8. command: ["-watch", "10s", "-debug"]
  9. volumes:
  10. - /var/run/docker.sock:/var/run/docker.sock:ro
  11. start_echoer:
  12. image: busybox:latest
  13. command: ["date"]
  14. labels:
  15. # Execute every minute
  16. - 'dockron.schedule=* * * * *'
  17. exec_echoer:
  18. image: busybox:latest
  19. command: sh -c "date > /out && tail -f /out"
  20. labels:
  21. # Execute every minute
  22. - 'dockron.date.schedule=* * * * *'
  23. - 'dockron.date.command=date >> /out'