https://github.com/devatoria/rocked
Interact with Docker containers without using the daemon
https://github.com/devatoria/rocked
Last synced: over 1 year ago
JSON representation
Interact with Docker containers without using the daemon
- Host: GitHub
- URL: https://github.com/devatoria/rocked
- Owner: Devatoria
- Created: 2016-12-08T22:28:03.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-08T23:36:49.000Z (over 9 years ago)
- Last Synced: 2025-02-02T17:32:44.689Z (over 1 year ago)
- Language: Go
- Size: 3.91 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rocked
[](https://godoc.org/github.com/Devatoria/rocked)
rocked has been created because of the need to get a lot of information about Docker containers very often. Some of these operations could lead to timeout if done through the Docker daemon because of overload.
rocked do the same things as you could through the Docker daemon, but by using the filesystem data. You will not solicit the daemon anymore.
## How to use it
Just import the library in your project, create a new rocked and start to use it!
```go
package main
import (
"fmt"
"github.com/Devatoria/rocked"
)
func main() {
r, err := rocked.NewRocked("/var/lib/docker")
if err != nil {
panic(err)
}
containers, err := r.ListContainers()
if err != nil {
panic(err)
}
for _, container := range containers {
data, err := r.InspectContainer(container)
if err != nil {
panic(err)
}
fmt.Println(container)
fmt.Println(data.Config.Hostname)
}
}
```
Please read the godoc reference to have the full list of features.