Bad tag for image generated with docker-compose

Hi Team,

I’m using a single Dockerfile ( in order to generate 3 differents images using “docker-compose build” command (with this file :

This file define the name of my images thanks to the instruction “target” : but the names og my generated image are not the same : e.g.
The name is “multitarget_ubuntu-pkg” instead of “ubuntu-pkg”

satoshi@nakamoto:/HelloWorld/docker-compose/multi-target$ docker images | grep multitarget
multitarget_ubuntu-src latest 29ce44725cbd 6 minutes ago 373MB
multitarget_ubuntu-bin latest 4ee1e56fd5a5 9 minutes ago 270MB
multitarget_ubuntu-pkg latest 85c99d0b15ae 10 minutes ago 207MB

Why docker-compose add the name of the directory (multi-target) to my image name ?
And how to avoid this behavior ?

Best Regards