services: service1: image: alpine command: sh -c "sleep 2" service2: image: alpine init: true command: ping localhost pre_stop: - command: echo "stop hook running..."