Open samuelbernardolip opened 2 years ago
For CI environment, the best approach to force all base images pull again and force build image with native docker, requires the following sequence of commands:
docker-compose rm -f -v -s
docker-compose pull
docker-compose build --no-cache
docker-compose up -d
and also set
pull_policy: always
in service configuration.
Version 2 releases are only running
docker-compose up
that only pull images on the first deployment. If an image changes it ignores the pull policy. To solve this issue is required thatdocker-compose pull
runs beforedocker-compose up
. An example of this solution to solve this issue: https://github.com/stephanlindauer/docker-compose-updater/blob/master/run.shBeside this, is also important in docker-compose.yml file to define the pull_policy property:
A reference of this detail would be also important in the documentation. Possible values are defined in docker-compose spec.