diff options
author | doug tangren <d.tangren@gmail.com> | 2018-12-24 13:11:02 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-24 13:11:02 +0900 |
commit | ebe4a2d80dffb89d1fbceb14dbac3dc6da004fb8 (patch) | |
tree | ab56800af4f921388035fd6d9f318f9ec0bd97cc /README.md | |
parent | 3c06c3a11ba1f7d362bde8b14d94b07b529850e8 (diff) |
update to 2018 edition (#141)
* update to 2018 edition
* remove more externs
* bump version
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 11 |
1 files changed, 1 insertions, 10 deletions
@@ -20,20 +20,15 @@ Some small example programs can be found in this repository's [examples director ### communicating with hosts To use shiplift, you must first have a docker daemon readily accessible. Typically this daemon processs -is resolvable via a url specified by an env var named `DOCKER_HOST`. If you are using osx, [docker-machine](https://docs.docker.com/machine/) typically -will have already set up every thing you need to get started when you run `docker-machine env {envid}`. +is resolvable via a url specified by an env var named `DOCKER_HOST`. ```rust -extern crate shiplift; let docker = shiplift::Docker::new(); ``` If you wish to be more explicit you can provide a host in the form of a `url.Url`. ```rust -extern crate shiplift; -extern crate url; - use shiplift::Docker; use url::Url; @@ -45,8 +40,6 @@ let docker = Docker::host(Url::parse("http://yourhost").unwrap()); 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()`. ```rust -extern crate shiplift; - use shiplift::Docker; let docker = Docker.new(); @@ -127,8 +120,6 @@ println!("- {:?}", img.delete().unwrap()); Containers are instances of images. To gain access to this interface use `docker.containers()` ```rust -extern crate shiplift; - use shiplift::Docker; let docker = Docker.new(); |