Skip to content
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

Write docker output to op writer #234

Merged
merged 1 commit into from
Dec 21, 2020

Conversation

carolynvs
Copy link
Contributor

@carolynvs carolynvs commented Nov 23, 2020

Instead of writing by default to os.Stdout, the docker driver writes to op.Out and the new field op.Err. The op defaults those values to stdout/stderr, so if you weren't setting them previously the behavior is the same though errors are now sent to stderr instead of all lumped into stdout. But for tools like porter that were collecting the output, this enables them to capture all the output and not have rogue lines printed directly to the screen.

This doesn't remove containerOut/containerErr which Docker is relying upon. It should just change the defaults so that the op writers are used first, and are overridden only when SetContainerOut/Err are used.

Closes #78

Instead of writing by default to os.Stdout, the docker driver writes to
op.Out and the new field op.Err. The op defaults those values to
stdout/stderr, so if you weren't setting them previously the behavior is
the same. But for tools like porter that were collecting the output,
this enables them to capture all the output and not have rogue lines
printed directly to the screen.

Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
Copy link
Member

@vdice vdice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Member

@radu-matei radu-matei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@carolynvs carolynvs merged commit 1787c6b into cnabio:master Dec 21, 2020
@carolynvs carolynvs deleted the docker-driver-output branch December 21, 2020 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

duffle driver ignores operation writer, writes directly to stdout
3 participants