Problem in the reading of the port parameter
gabrielxfs opened this issue · comments
I have tried the last example listed on the README, as rewrited below:
version: '3.9'
services:
whoami:
image: traefik/whoami
command:
# It tells whoami to start listening on 2001 instead of 80
- --port 2001
- --name iamfoo
Tried in that way:
whoami:
# A container that exposes an API to show its IP address
image: traefik/whoami
command:
- "--port 90"
deploy:
replicas: 1
restart_policy:
condition: on-failure
labels:
- "traefik.enable=true"
- "traefik.http.routers.whoami.rule=Host(`foo.bar.localhost`)"
- "traefik.http.services.whoami.loadbalancer.port=90"
- "traefik.constraint-label=http_network"
networks:
http_network:
aliases:
- whoami
Not worked and the container logs output was:
$sudo docker logs c3f33eb92a5b
flag provided but not defined: -port 90
Hello,
it's not related to whoami.
The Docker Compose specification doesn't allow setting a flag and its value in the same line of the array.