Docker-compose versioning

hello all,

is it possible to declare tag version in docker-config?
for now i am using the cli to do so… but it creates a copy of the my-app:latest…

thanks

ok i relaying my own q:

version: "3.9"
services:
  my-name:
    build: .
    image: my-name:v1
    container_name: my-name

Thanks for sharing your solution.

PS.: I edited your question. Next time, please, use a code block (</>) instead of block quotes when you insert codes especially YAML files in which the indentation is important.