services: source: build: context: . dockerfile: Dockerfile image: ${SOURCE_IMAGE} consumer: image: alpine depends_on: - source command: ["cat", "/data/content.txt"] volumes: - type: image source: ${SOURCE_IMAGE} target: /data image: subpath: app