File tree Expand file tree Collapse file tree 1 file changed +16
-10
lines changed Expand file tree Collapse file tree 1 file changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,22 @@ func (e *docker) Run() error {
95
95
}
96
96
}()
97
97
98
+ out , err := cli .ContainerLogs (
99
+ ctx , resp .ID , types.ContainerLogsOptions {
100
+ ShowStdout : true ,
101
+ ShowStderr : true ,
102
+ Follow : true ,
103
+ },
104
+ )
105
+ if err != nil {
106
+ return err
107
+ }
108
+
109
+ go func () {
110
+ _ , err = stdcopy .StdCopy (e .stdout , e .stdout , out )
111
+ util .LogErr ("docker executor: stdcopy" , err )
112
+ }()
113
+
98
114
statusCh , errCh := cli .ContainerWait (
99
115
ctx , resp .ID , container .WaitConditionNotRunning ,
100
116
)
@@ -109,16 +125,6 @@ func (e *docker) Run() error {
109
125
}
110
126
}
111
127
112
- out , err := cli .ContainerLogs (
113
- ctx , resp .ID , types.ContainerLogsOptions {ShowStdout : true },
114
- )
115
- if err != nil {
116
- return err
117
- }
118
-
119
- _ , err = stdcopy .StdCopy (e .stdout , e .stdout , out )
120
- util .LogErr ("docker executor: stdcopy" , err )
121
-
122
128
return nil
123
129
}
124
130
You can’t perform that action at this time.
0 commit comments