diabhey / docker-api-rs

Rust interface to Docker containers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.12"

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.12", 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.12", 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

About

Rust interface to Docker containers

License:MIT License


Languages

Language:Rust 99.8%Language:Shell 0.2%