How to add $(...) in Docker Compose How to add $(...) in Docker Compose jenkins jenkins

How to add $(...) in Docker Compose


$(...) is not an environment variable, it's command substituion.

You need to use an environment variable to pass in the value.

DOCKER_PATH=$(which docker) docker-compose up

docker-compose.yaml (snippet)

- ${DOCKER_PATH}:/usr/bin/docker:ro