How to tag docker image with docker-compose

后端 未结 4 1820
清歌不尽
清歌不尽 2020-12-04 11:42

I want to build image via docker-compose and set specific tag to it. Documentation says:

Compose will build and tag it with a generated name, and use

4条回答
  •  长情又很酷
    2020-12-04 12:13

    Original answer Nov 20 '15:

    No option for a specific tag as of Today. Docker compose just does its magic and assigns a tag like you are seeing. You can always have some script call docker tag after you call docker-compose.

    Now there's an option as described above or here

    build: ./dir
    image: webapp:tag
    

提交回复
热议问题