-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logs are preserved (possibly erroneously) across launches. #1946
Comments
This is because after 1.4.0 we don't destroy the container on You can disable this feature with |
@dnephin makes sense. I changed the 'echo' to 'date -T' to demonstrate: Run 1:
^ Shows the log as expected Run 2:
^ Shows the new log and the old log Run 3:
^ Shows only the old logs, and does not show the new logs :( Run 4:
^ Now it's showing the new log, Logs from 1, 2, and the missed log from Run 3 |
I have been updated docker-compose from 1.2.0 to 1.4.0 and spend twenty crazy minutes trying to find out what is going on with my logs after |
Ouch! I like that it doesn't recreate the container (it's noticeably faster to boot up), but showing the logs from last time is highly confusing and spammy in my terminal. I have two services, one of which I want to see the logs of, and the other I don't. Now when I say |
This is really a bug caused by a workaround for another bug. On Back when we always recreated containers, this was fine, but now that they're longer-lived it makes for lots of log output. The correct solution is to change the order of API calls:
However, this will involve a significant refactoring, because right now the recreate + start steps are tightly coupled. See #1510 for a sketch of one possible solution, but we're still figuring it out. |
I've been using this: |
Isn't this a duplicate of #1756? |
It is. Closing as duplicate, Thanks! |
I'm not sure if this is a feature of a bug. I've installed
docker-compose version: 1.4.0
from homebrew and I'm seeing logs getting preserved across runs:docker-compose.yml
Here's the log of multiple
docker-compose up
:As you can see the logs are getting preserved across the runs.
The text was updated successfully, but these errors were encountered: