Modify image config when running container

Similer case

Feature idea

Running a solid copy of the image is ok but runnig a solid exact configuration is not needed especialy for development containers and network security
In my case : I need to exclude some ports, env_vars and pathes from an image with nginx runnig over a macvlan network which makes some ports available for security and container size

I didn’t creat the image, I’m just using it

Additional question

is there a way to overcome rebuilding images ?