title: Docker compose shows Invalid port error when I set ports as env variables
body: <p>I have a simple docker-compose file which starts my spring boot application.</p>
  
  <pre><code>version: '3'
  services:
    applic:
      build:
        context: .
        dockerfile: local.Dockerfile
        args:
          - DEBUG_PORT=${DEBUG_PORT}
          - DEBUG_FLAG=${DEBUG_FLAG}
      environment:
        - "SPRING_PROFILES_ACTIVE=local"
        - "DEBUG_PORT=5005"
        - "DEBUG_FLAG=true"
      ports:
        - "8083:8083"
        - $DEBUG_PORT:$DEBUG_PORT
      depends_on:
        - mysql
      volumes:
        - "../:/mnt"
  </code></pre>
  
  <p>when I start it with <code>docker-compose up --build</code> command it shows me this error: </p>
  
  <pre><code>applic.ports is invalid: Invalid port ":", should be [[remote_ip:]remote_port[-remote_port]:]port[/protocol]
  </code></pre>
  
  <p>What did I do wrong? I tried many solutions from the Internet, but nothing helped.</p>