Setup relay node in docker container

Can the limitation of " Each node (Relay/Block Producing) must run in an independent server." be worked around by running Relay in a docker container with it’s own node/port ?
I have a beefy machine that can run both nodes, but don’t want to spin up separate server for relay.

Yes, this can be done with no problem - even on a RaspberryPi. Lately however, I’ve seen lots of invalid Tx on the relay that made it fall behind. Currently, I run the relay on GCE and the BP on a Pi.
There are a few issues with arm64 related to performance in crypto libraries, but you will likely not see those when you run on x86_64.

  1. Define a network like this …
docker network create --subnet=172.18.0.0/16 cardano
  1. Use this network in both containers
docker run --network cardano ...
  1. Change the topologies such that it uses docker dns names

If DNS resolution fails for some reason, you can use the docker assigned IPs. These should however then be given explicitly with docker run --ip 172.18.0.10 ...

If all goes well, we may have docker compose and k8s scripts for this upstream.