Use bridge networks - Docker Documentation
https://docs.docker.com/network/bridgeThese settings do not persist across a reboot, so you may need to add them to a start-up script. Use the default bridge network. The default bridge network is considered a legacy detail of Docker and is not recommended for production use. Configuring it is a manual operation, and it has technical shortcomings. Connect a container to the default bridge network