services: sample: image: alpine command: sh -c 'sleep 30' deploy: replicas: 2 volumes: - data:/shared pre_start: - image: alpine command: sh -c 'echo "ran" >> /shared/log' volumes: data: