Open dcodesdev opened 1 month ago
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
.
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!
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 runningdocker 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.