#docker #api #models #stubs

docker-api-stubs

Generated Docker API swagger stubs for use in docker-api

3 releases (breaking)

Uses new Rust 2021

0.4.0 Oct 19, 2022
0.3.0 Aug 26, 2022
0.2.0 Aug 26, 2022
0.1.0 Jul 27, 2022

#1231 in Network programming

Download history 1/week @ 2022-08-09 1/week @ 2022-08-16 94/week @ 2022-08-23 46/week @ 2022-08-30 105/week @ 2022-09-06 197/week @ 2022-09-13 248/week @ 2022-09-20 234/week @ 2022-09-27 201/week @ 2022-10-04 255/week @ 2022-10-11 586/week @ 2022-10-18 281/week @ 2022-10-25 248/week @ 2022-11-01 1122/week @ 2022-11-08 1240/week @ 2022-11-15 1210/week @ 2022-11-22

3,876 downloads per month
Used in docker-api

MIT license

305KB
4K SLoC

docker-api

GitHub Actions MIT licensed Released API docs

a rust interface to Docker containers

Install

Add the following to your Cargo.toml file

[dependencies]
docker-api = "0.10"

Supported API

Default endpoints include:

  • Containers
  • Images
  • Networks
  • Volumes
  • Exec
  • System

To enable swarm endpoints add a swarm feature to Cargo.toml like so:

docker-api = { version = "0.10", features = ["swarm"] }

Swarm endpoints include:

  • Swarm
  • Nodes
  • Services
  • Tasks
  • Secrets
  • Configs
  • Plugins

Currently supported API version: v1.41

Features

SSL Connection

To enable HTTPS connection to docker add a tls flag to Cargo.toml.

Chrono

To enable chrono DateTime timestamps add a chrono feature flag to Cargo.toml.

Default features

By default only chrono feature is enabled. To disable it use:

docker-api = { version = "0.10", default-features = false }

Usage

Examples for most API endpoints can be found in the examples directory.

Notice

This crate is a fork of shiplift.

License

MIT

Dependencies

~2–3MB
~59K SLoC