Docker Community Forums

Share and learn in the Docker community.

Howto define multiple hostname container with compose version 1

Howto define two hostnames container with compose version 1

I need to define (with the IP of the container), two names or alias:
ip_container hostname1 hostname2

I try extra_hosts but need to write the own container IP, but compose file doesn’t know this IP.

Regards,
Cesar Jorge