title: How to add $(...) in Docker Compose
body: <p>I have a docker-compose.yml which contains the stuff to start a jenkins-server on CentOS7:</p>
  
  <pre><code>jenkins:
    image: jenkins
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - $(which docker):/usr/bin/docker:ro
      - /usr/lib64/libsystemd-journal.so.0:/usr/lib/x86_64-linux-gnu/libsystemd-journal.so.0
      - /usr/lib64/libsystemd-id128.so.0:/usr/lib/x86_64-linux-gnu/libsystemd-id128.so.0
      - /usr/lib64/libdevmapper.so.1.02:/usr/lib/x86_64-linux-gnu/libdevmapper.so.1.02
      - /usr/lib64/libgcrypt.so.11:/usr/lib/x86_64-linux-gnu/libgcrypt.so.11
      - /usr/lib64/libdw.so.1:/usr/lib/x86_64-linux-gnu/libdw.so.1
    ports:
      - "8080:8080"
  </code></pre>
  
  <p>But I'm not able to run the compose because I keep getting an error on <code>$(which docker):/usr/bin/docker:ro</code>. How do I have to fix this?</p>
  
  <p>Error: <code>ERROR: Invalid interpolation format for "volumes" option in service "jenkins": "$(which docker):/usr/bin/docker:ro"</code></p>
  
  <p>Is it still not possible to include environment variables? I'm searching for the most right solution. Thanks</p>