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
- Host: GitHub
- URL: https://github.com/matthewmueller/go-dockrun
- Owner: matthewmueller
- Created: 2017-07-15T19:28:31.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-04T08:01:27.000Z (almost 9 years ago)
- Last Synced: 2025-01-18T22:17:23.326Z (over 1 year ago)
- Topics: container, docker, go, testing
- Language: Go
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# dockrun
[](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