title: integer variable expression in docker-compose.yml
body: <p>I would like to use integer expression in <code>docker-compose.yml</code> to set ports based on the <code>BASE_PORT</code> variable.</p>
  
  <p><strong>I have a <code>.env</code> file with the following content:</strong></p>
  
  <pre><code>BASE_PORT=57900
  </code></pre>
  
  <p><strong>My start bash script looks like this:</strong></p>
  
  <pre><code>#/bin/sh
  
  . .env
  docker-compose stop
  docker-compose rm -v -f
  docker-compose up -d adminserver
  </code></pre>
  
  <p><strong>docker-compose.yml</strong></p>
  
  <pre><code>...
  services:
    adminserver:
      image: ....
      hostname: ...
      ports:
        - ${BASE_PORT}:8001
      ...
  </code></pre>
  
  <p>This configuration works like a charm, <code>docker ps | grep 8001</code> returns with a proper content.</p>
  
  <p><strong>But I would like to use more port configurations and more <code>ports</code> sections:</strong></p>
  
  <pre><code>...
  services:
    adminserver:
      image: ....
      hostname: ...
      ports:
        - $((BASE_PORT+1)):8001
        - $((BASE_PORT+2)):8002
        - $((BASE_PORT+3)):8003
      ...
  
    databaseserver:
      image: ....
      hostname: ...
      ports:
        - $((BASE_PORT+10)):1541
  
    zookeeper:
      image: ....
      hostname: ...
      ports:
        - $((BASE_PORT+30)):2181
  
    kafka:
      image: ....
      hostname: ...
      ports:
        - $((BASE_PORT+40)):9092
        - $((BASE_PORT+41)):9093
        - $((BASE_PORT+42)):9094
  </code></pre>
  
  <p>The <code>$((BASE_PORT+1))</code> expression works in shell but it does not work in my *.yml file.</p>
  
  <p>I get this error back:</p>
  
  <pre><code>ERROR: Invalid interpolation format for "ports" option in service "adminserver": "$((BASE_PORT+1)):8001"
  </code></pre>
  
  <p>Any idea how to make it works?</p>