Can docker compose skip build if the image is present?

后端 未结 2 2059
情书的邮戳
情书的邮戳 2021-01-02 01:48

Is it possible to run docker-compose up in such a way that it will only build if the image isn\'t present in the repository?

I\'m working on a test sce

2条回答
  •  渐次进展
    2021-01-02 02:04

    i am using docker-compose v2.1

    when we run docker compose up it check image is exist or not. if not exist then only it build that image otherwise it will skip that part

    docker-compose

    version: '2.1'
    
    services:
      devimage:
        image: nodedockertest
        build: .
        environment:
          NODE_ENV: development
        ports:
          - 8000:8000
    

提交回复
热议问题