Redirect traffic on docker from domain:domain instead of domain:ip

Hi,

I am contenarizing our E2E tests and I need to be able to redirect the URL naming such as. zxc.asd-> asd.iop

So when the I try to access zxc.asd/users it will actually try to acces asd.iop/users

I have tried with

–add-host by zxc.asd:asd.iop

when running the container but is not working.

Any way to solve this issue?