Docker already has this feature. I tried to override the image name with a simple docker-compose command, it works.
For instance,
docker-compose.yml with content
my-httpd:
image: httpd:latest
ports:
- "1110:80"
docker-compose.override.yml ,
my-httpd:
image: httpd:2.4
docker-compose -d docker ps,

ports docker-compose.yml ( ) image docker-compose.override.yml, .
. , docker-compose -d,
docker-compose -f <DOCKER COMPOSE LOCATION> -f <OVERRIDE FILE LOCATION> up -d
2:
, .
, ports , , , image (non array).