Traefik v2 chooses wrong port

I try to set a container that exposes two ports. I set

       - traefik.enable=true
       - traefik.port=3000

The services exposes two ports

        "NetworkSettings": {                                                                                                      
            "Bridge": "",                                                                                                         
            "SandboxID": "9c631f5aa1af0eb04befa34eb72fc71fe92e2122285465c94bdd552337be26bf",                                      
            "HairpinMode": false,                                                                                                 
            "LinkLocalIPv6Address": "",                                                                                           
            "LinkLocalIPv6PrefixLen": 0,                                                                                          
            "Ports": {                                                                                                            
                "22/tcp": null,                                                                                                   
                "3000/tcp": null                                                                                                  

And traefik keeps assigning port number 22 to the service:

What could be wrong?

It seems like traefik.port label inside a container definition doesn't work at all for some reason.

The correct setting must be"

Some reason would be that you are trying to use v1 syntax with v2. This is not supported.