Compose & Extending

Hello, we have a set up where the CI compose file will extend a service from our local development compose file, the local service exposes ports but we would need the CI definition to not expose any ports to avoid any conflict of ports from other builds.

Is it possible to extend a service, and override the “ports” property to being empty?