An open API service indexing awesome lists of open source software.

https://github.com/matthewmueller/go-dockrun

Simple container testing
https://github.com/matthewmueller/go-dockrun

container docker go testing

Last synced: about 1 month ago
JSON representation

Simple container testing

Awesome Lists containing this project

README

          

# dockrun

[![GoDoc](https://godoc.org/matthewmueller/go-dockrun?status.svg)](https://godoc.org/github.com/matthewmueller/go-dockrun)

Simple container testing

## Install

```
go get github.com/matthewmueller/go-dockrun
```

## Example

```go
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)
}
```

## License

MIT