Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
shiplift
a rust interface for maneuvering docker containers
install
Add the following to your Cargo.toml
file
[]
= "0.2"
docs
Find them here.
usage
Some small example programs can be found here.
communicating with hosts
To use shiplift you must first have a running docker daemon readily accessible. Typically this daemon
is reachable via url identified by an env named DOCKER_HOST
. If you are using osx, docker-machine typically
will have already set up every thing you need to get started when you run docker-machine env {envid}
.
extern crate shiplift;
let docker = new;
If you wish to be more explicit you can provide a host in the form of a url.Url
.
extern crate shiplift;
extern crate url;
use Docker;
use Url;
let docker = host;
images
If you are interacting with docker containers, chances are you will also need to interact with docker image information. You can interact docker images with docker.images()
.
extern crate shiplift;
use Docker;
let docker = Docker.new;
let images = docker.images;
list host-local images
for i in images.list.unwrap
find remote images
for i in image.search.unwrap
creating new images from existing image
todo
accessing image info
let img = images.get;
inspecting image info
println!;
getting image history
for h in img.history.unwrap
deleting image
println!;
containers
Containers are instances of images. To gain access to this interface use docker.containers()
extern crate shiplift;
use Docker;
let docker = Docker.new;
let containers = docker.containers;
listing host local containers
for c in containers.list.unwrap
get a container reference
let container = containers.get;
inspect container details
println!;
access top
info
println!;
view container logs
(todoc)
view a list of container changes
for c in container.changes.unwrap
stream container stats
for stats in container.stats.unwrap
stop, start, restart container
container.stop;
container.start;
container.restart;
misc
todoc
Doug Tangren (softprops) 2015