Simple container testing
go get github.com/matthewmueller/go-dockrun
client, err := dockrun.New()
if err != nil {
log.Fatal(err)
}
container, err := client.
Container("yukinying/chrome-headless:latest", "chromium").
Expose("9222:9222").
Run(ctx)
if err != nil {
log.Fatal(err)
}
defer container.Kill()
err = container.Check(ctx, "http://localhost:9222")
if err != nil {
log.Fatal(err)
}
MIT