Open patrickhuber opened 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)
}
}
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.