I have an EC2 instance running a dockerized application using docker-compose.
Every time I run docker-compose up
, many days' worth of logs to stdout for all services. This means that I have to wait up to an hour before all the logs have been printed and I start seeing recent logs.
Any ideas?
Your problem is that the old containers created by docker-compose are re-used.
Starting with docker-compose up --force-recreate
should do the trick.
Though I remember this from the past, and for me, this problem no longer happens. So it could also be something else.
Please make sure the following:
docker-compose version
)docker-compose ps
), as then you will attach to them instead of starting them and then printing all the logs in the container is common.