patrickhuber / wrangle

Wrangle is a solution for managing multiple configuration stores and multiple command line interfaces across multiple environments.
0 stars 0 forks source link

integrate docker container execution for running processes in isolation #28

Open patrickhuber opened 6 years ago

patrickhuber commented 6 years ago

Use the docker go library to enable things like running bbr in a container

Should work with package management by mounting the package library as a read only volume.

Need to think about windows / Linux container vs Linux / windows packages.

patrickhuber commented 6 years ago

sample here:

https://docs.docker.com/develop/sdk/examples/#list-and-manage-containers

package main

import (
    "fmt"

    "github.com/docker/docker/api/types"
    "github.com/docker/docker/client"
    "golang.org/x/net/context"
)

func main() {
    cli, err := client.NewEnvClient()
    if err != nil {
        panic(err)
    }

    containers, err := cli.ContainerList(context.Background(), types.ContainerListOptions{})
    if err != nil {
        panic(err)
    }

    for _, container := range containers {
        fmt.Println(container.ID)
    }
}