Uses the older image for the new container
When I'm updating my container with docker rollout it creates two images, <dirname>_<service-name> and <dirname>-<service-name> (one of them separated by _ and the other by -)
These are two different images, one of them doesn't get updated (from days ago) and the other is the new one built by docker-compose -f <file>.yaml build backend just before running docker rollout
The problem is that when running docker rollout -f <filename> it creates a new container but uses the older image therefore it doesn't update anything.
I don't know what is happening behind the scenes but took me hours of debugging until I found out the issue was docker rollout.
I added the image field for the docker-compose.yaml file, now it works.
But the bug still exists if you don't specify an image field for your service.
The difference comes from using different tools. docker rollout uses docker compose(v2) over docker-compose (v1) if it's available. The naming convention must have changed and now hyphens are used instead of underscores.
I suggest using Docker Compose now, as docker-compose is deprected. It probably means replacing docker-compose with docker compose in your scripts 😃
If you want to keep using docker-compose instead, you can patch lines 34-42 (linked below) in the script to set COMPOSE_COMMAND=docker-compose.
https://github.com/Wowu/docker-rollout/blob/93a733199a4a02d183ef84d494611ac12ac99024/docker-rollout#L34-L42
Makes sense!
Maybe add it to the caveats list in the readme file so that others don't make the same mistake as I did.
Thank you for your help!
Good idea, I added a note to readme: https://github.com/wowu/docker-rollout/commit/7487c2da51f91044c8efcc3794b02ad2957e9673