toml
[dependencies]
docker_client = "0.1.0-alpha4"
Create container example.
```rust extern crate docker_client;
use dockerclient::DockerClient; use dockerclient::container::Config;
fn main() {
let client = DockerClient::connect("/var/run/docker.sock");
let config = Config::with_image("alpine")
.name("test")
.build();
match client.create_container(config) {
Ok(c) => {
println!("Container created: {:?}", c)
},
Err(e) => {
println!("Error {:?}", e)
}
}
} ```