What would be the best way to share ports among the containers?
You don't really "share" ports between containers. Instead, you want to create network and attach each container to that network. Each container gets a network alias (essentially a hostname) that you can use to hit the service.
$ docker network create foo
$ docker run --network=foo --...
You can include the arguments in the deployment yaml. The official docs include examples and further customization.
args: ["me", "yes", "https://my.url"]