-
Notifications
You must be signed in to change notification settings - Fork 48
fix(docker): get container logs even on error #214
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A little torn on this change. Can you put in more details about what this change means?
If I'm reading correctly if for some reason my process crashes then the container won't be removed anymore?
That is correct. If the container exits with an error the container would not be removed so further investigation can be carried out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this will work, based on my testing when I had the issue with space running out on the device. I think we have to get rid of auto_remove.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this process wrapped in the same process that prevents cancelling it?
Also I think at its current version @ericzbeard is correct this won't capture the error he is talking about.
I'm still super torn on this PR. I prefer |
…Windows (aws-cloudformation#208) * When on windows will not use os.geteuid() but root:root, also if call fails it will add warning message * Change test for docker no euid to work on Windows
…ws-cloudformation#209) Unpin importlib in bandit pre-commit config This reverts commit 768eed6.
…multi-os (aws-cloudformation#215) * Update github actions to latest version and test on all branches/PR * Added default line ending to LF on git checkout * Remove Python 3.10 from testing, fails for macos and windows * added precommit caching and pip caching * Add noop CI job for requirements
Let me clean up this PR |
Closes #211
On docker container error
auto_remove=True
would not return container output. Switched toremove=True
indocker.client.containers.run
for slightly less robust container removal but much better logging.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.