Use websocket to transmit logs
This commit is contained in:
parent
539cbd68a9
commit
d2a49e5740
6 changed files with 67 additions and 19 deletions
|
|
@ -29,7 +29,7 @@ func Ps() ([]types.Container, error) {
|
|||
return containers, nil
|
||||
}
|
||||
|
||||
func Run(image string) (string, error) {
|
||||
func Run(image string, cmd []string) (string, error) {
|
||||
cli, err := newCli()
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
|
@ -41,6 +41,7 @@ func Run(image string) (string, error) {
|
|||
AttachStdout: true,
|
||||
AttachStderr: true,
|
||||
Image: image,
|
||||
Cmd: cmd,
|
||||
},
|
||||
&container.HostConfig{},
|
||||
&network.NetworkingConfig{},
|
||||
|
|
|
|||
Reference in a new issue