Use websocket to transmit logs

This commit is contained in:
nemunaire 2021-05-02 17:59:55 +02:00
commit d2a49e5740
6 changed files with 67 additions and 19 deletions

View file

@ -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{},