@@ -155,6 +155,17 @@ func (d *DryRunClient) VolumeRemove(ctx context.Context, volumeID string, force
155
155
return ErrNotImplemented
156
156
}
157
157
158
+ func (d * DryRunClient ) ContainerExecCreate (ctx context.Context , container string , config moby.ExecConfig ) (moby.IDResponse , error ) {
159
+ fmt .Printf ("%sCreating Exec configuration for container %s with command '%s'\n " , DRYRUN_PREFIX , container , strings .Join (config .Cmd , " " ))
160
+ config .Cmd = []string {"true" }
161
+ return d .apiClient .ContainerExecCreate (ctx , container , config )
162
+ }
163
+
164
+ func (d * DryRunClient ) ContainerExecStart (ctx context.Context , execID string , config moby.ExecStartCheck ) error {
165
+ fmt .Printf ("%sExecuting command in detach mode\n " , DRYRUN_PREFIX )
166
+ return nil
167
+ }
168
+
158
169
// Functions delegated to original APIClient (not used by Compose or not modifying the Compose stack
159
170
160
171
func (d * DryRunClient ) ConfigList (ctx context.Context , options moby.ConfigListOptions ) ([]swarm.Config , error ) {
@@ -189,10 +200,6 @@ func (d *DryRunClient) ContainerExecAttach(ctx context.Context, execID string, c
189
200
return d .apiClient .ContainerExecAttach (ctx , execID , config )
190
201
}
191
202
192
- func (d * DryRunClient ) ContainerExecCreate (ctx context.Context , container string , config moby.ExecConfig ) (moby.IDResponse , error ) {
193
- return d .apiClient .ContainerExecCreate (ctx , container , config )
194
- }
195
-
196
203
func (d * DryRunClient ) ContainerExecInspect (ctx context.Context , execID string ) (moby.ContainerExecInspect , error ) {
197
204
return d .apiClient .ContainerExecInspect (ctx , execID )
198
205
}
@@ -201,10 +208,6 @@ func (d *DryRunClient) ContainerExecResize(ctx context.Context, execID string, o
201
208
return d .apiClient .ContainerExecResize (ctx , execID , options )
202
209
}
203
210
204
- func (d * DryRunClient ) ContainerExecStart (ctx context.Context , execID string , config moby.ExecStartCheck ) error {
205
- return d .apiClient .ContainerExecStart (ctx , execID , config )
206
- }
207
-
208
211
func (d * DryRunClient ) ContainerExport (ctx context.Context , container string ) (io.ReadCloser , error ) {
209
212
return d .apiClient .ContainerExport (ctx , container )
210
213
}
0 commit comments