If you are – like me – running podman-compose from EPEL in RHEL8 and running into the error message “invalid config provided: extra host entries must be specified on the pod: network cannot be configured when it is shared with a pod” the problem is a incompatibility between the very old version of podman-compose in EPEL8 and podman 4.1.
An update to a new version of podman-compose is not possible because of a missing dependency of python-dotenv. But thanks to Gwyn Ciesla an update has been pushed to testing EPEL8 and an update of podman-compose could be soon available. Thanks a lot Gwyn!
Until than simply run “dnf module switch-to container-tools:4.0” and continue running until an update version of podman-compose is available.
Update: Thanks to Gwyn Ciesla the update is available and a “dnf module switch-to container-tools:rhel8″ will fix it (hopefully).