services: sample: image: alpine command: sh -c 'sleep 30' volumes: - data:/shared pre_start: - image: alpine command: sh -c 'echo ${HOOK_VERSION} >> /shared/versions.txt' volumes: data: