How to have 2 containers connect to other container using TCP in docker network

I have this right now:

docker network rm cprev || echo;
docker network create cprev || echo;

docker run --rm -d -p '3046:3046' 
    --net=cprev --name 'cprev-server' cprev-server

docker run --rm -d -p '3046:3046' 
    -e cprev_user_uuid=111 --net=cprev --name 'cprev-agent-1' cprev-agent

docker run --rm -d -p '3046:3046' 
    -e cprev_user_uuid=222 --net=cprev --name 'cprev-agent-2' cprev-agent

basically the 2 cprev-agents are supposed to connect to the cprev-server using TCP. The problem is I am getting this error:

docker: Error response from daemon: driver failed programming external
connectivity on endpoint cprev-agent-1
(6e65bccf74852f1208b32f627dd0c05b3b6f9e5e7f5611adfb04504ca85a2c11):
Bind for 0.0.0.0:3046 failed: port is already allocated.

I am sure it’s a simple fix but frankly I don’t know how to allow two way traffic from the two agent containers without using the same port etc.

Source: StackOverflow