Docker build image causing port issues

I am trying to build a web image of Jitsi with Docker. I have done it using:

docker build -t web:v1 .

I then changed the docker-compose.yml file as :

version: '3'

services:
    # Frontend
    web:
        image: web:v1
        restart: ${RESTART_POLICY}
        ports:
            - '${HTTP_PORT}:80'
            - '${HTTPS_PORT}:443'

...

I then try to run it as:

docker-compose up -d

but I get one error - * error decoding 'Ports': No port specified: :/udp<empty>

How do I fix this?