This repository has been archived on 2026-01-06. You can view files and clone it, but cannot push or open issues/pull-requests.
|
module docker
|
|
|
|
import json
|
|
import net.urllib
|
|
|
|
struct Container {
|
|
id string [json: Id]
|
|
names []string [json: Names]
|
|
}
|
|
|
|
pub fn containers() ?[]Container {
|
|
res := get(urllib.parse('/containers/json') ?) ?
|
|
|
|
return json.decode([]Container, res.text) or {}
|
|
}
|