how to get docker-compose to use the latest image from repository

后端 未结 10 1375
栀梦
栀梦 2021-01-30 07:51

I don\'t know what I\'m doing wrong, but I simply cannot get docker-compose up to use the latest image from our registry without first removing the old containers f

10条回答
  •  一向
    一向 (楼主)
    2021-01-30 08:26

    I spent half a day with this problem. The reason was that be sure to check where the volume was recorded.

    volumes: - api-data:/src/patterns

    But the fact is that in this place was the code that we changed. But when updating the docker, the code did not change.

    Therefore, if you are checking someone else's code and for some reason you are not updating, check this.

    And so in general this approach works:

    docker-compose down

    docker-compose build

    docker-compose up -d

提交回复
热议问题