summaryrefslogtreecommitdiffstats
path: root/src/builder.rs
AgeCommit message (Collapse)Author
2020-03-19Specify user when creating container (#220)Tom Fay
2020-03-19appease clippy (#225)Colvin Wellborn
2020-03-19Fix formatting (#224)Colvin Wellborn
Ran `cargo +nightly fmt --all` as indicated in the PR template. Since this affects code not otherwise being modified, I did this as a separate PR.
2020-01-04make image and container option builder interfaces consistent (#211)Colvin Wellborn
`ContainerListOptionsBuilder::all()` took no arguments, assuming a true value. However, `ImageListOptionsBuilder::all()` accepts a boolean. To make these consistent, the latter no longer accepts a boolean and, like the former, assumes true.
2019-12-26Update the ContainerOptionsBuilder with new publish all ports option (#215)Tyler Jones
The following change is to provide the configuration option `PublishAllPorts` which will map all exposed ports on a container to random and available ports on the host machine. This configuration option is documented [here](https://docs.docker.com/engine/api/v1.39/#operation/ContainerCreate).
2019-12-06port build to gh actions (#204)Doug Tangren
* port build to gh actions * attempt 2: trip hook registration * hooked to pushes * gh actions badge * build cache * gate at job level * fix badge merge * populate cache after checkout * work now cache later
2019-10-13Add 'publish' method to expose a port (#198)Anthony Griffon
* Renamed 'expose' to 'port' and add 'expose' to expose a port without linking it to the host * update Version to 0.5.1
2019-09-14feat: use chrono to deserialize date times (#190)Marc Schreiber
2019-08-10Added function to tag an image (#187)MHamill98
* Added function to tag an image * Removed debug and println
2019-06-01Add WorkingDir container's option support (#175)Sergey Tsaplin
2019-05-17Add LogsOptionsBuilder::since() method (#169)Max Eliseev
* Add LogsOptionsBuilder.since() method * test for LogsOptionsBuilder
2019-04-26Add explanative sentence for volumes option (#164)Keir Lawson
2019-04-21Added `ExposedPorts` mapping (#162)Graham Wihlidal
* Added `ExposedPorts` mapping, as per https://docs.docker.com/engine/api/v1.26/#operation/ContainerCreate * Correct the ExposedPorts json based on the latest Docker schema * Derived debug for all builder option types (useful for debugging) * Adjust container_options_expose test to match latest code * Applied cargo fmt
2019-03-30Add a registry authentication. (#157)Anton Ageev
2019-02-22Migrate serde dependency to use derive feature (#152)Vegard Sandengen
This is in line with best practices recommended by serde[1]. This will also resolve downstream crates depending on shiplift who enable the serde derive feature, due to Cargos unification of features for each crate[2]. [1]: https://github.com/serde-rs/serde/issues/1441 [2]: https://github.com/rust-lang/cargo/issues/4361#issuecomment-348538243
2019-02-13Copy from container (#150)Andy Caldwell
* Add 'copy_from' function to 'Container' * Run clippy * Update deps
2019-01-21Add ContainerOptionsBuilder::privileged() (#149)Cyril Plisko
Fixes #148
2019-01-08Support for Userns Mode (#147)Marc Schreiber
2018-12-24document images.pull behaviorsoftprops
2018-12-24update to 2018 edition (#141)doug tangren
* update to 2018 edition * remove more externs * bump version
2018-12-23update travis build (#140)doug tangren
* update travis build * notes on fmting * remove quotes * comment below * rouge quote * first host.port usage * fix deprecation warning
2018-12-22Fix serialization of network commands and add ↵Marc Schreiber
ContainerConnectionOptionsBuilder (#133)
2018-12-22Support for setting CPU shares/memory for image builder (#134)Dylan McKay
* Support for setting CPU shares/memory for image builder * Support for setting the number of CPU shares allocated to a container
2018-12-22Remove an unused type parameter from the 'nocache' function (#135)Dylan McKay
* Remove an unused type parameter from the 'nocache' function The function is currently unusable because the type parameter has no uses or bounds. * Fix existing rustfmt violation Semicolons need to be added to return statements. Without this, the build fails. * Replace call of Uri::port to Uri::port_part The former is deprecated in favor of the latter. This causes a deprecation warning when compiling shiplift. This patch fixes the deprecation warning.
2018-12-22Support for AutoRemove flag (#137)Szymon Janota
* Support for AutoRemove flag * Rust fmt
2018-12-22feat: create, list, and delete volumes (#138)Marc Schreiber
2018-12-22Support interactive stdin/stdout streams (#136)Dylan McKay
* Support interactive stdin/stdout streams This adds support for streaming stdin, stderr, and stdout independently to a running container. The underlying API is futures-based, meaning the code is implemented asynchronously. A synchronous API is also exposed, which is implemented by simply waiting on the asynchronous API futures. This also modifies the existing Tty logic so that the storage type of the data is a Vec<u8> rather than a String. This is also how the Rust standard library persists data from the standard streams. In my particular application, I'm using stdin/stdout as the communication method between a container a host application. In it, a byte-based protocol is used. Streaming works by performing a TCP upgrade; upgrading a higher-level HTTP connection to a lower-level TCP byte stream upon agreement with the server. Docker will automatically upgrade HTTP container log requests to TCP byte streams of a custom std{in,out,err} multiplexing protocol if the client requests it with the 'Connection: Upgrade' header. * Return an error rather than panic when Docker refuses to upgrade to TCP * Add interpret-as-string accessors to tty::Chunk Also updates the examples to use them.
2018-11-14Async api (#128)Antoine Büsch
* Refactored Transport for better async use Still a bit rough, but it now builds a big future using combinators. It still does one `Runtime::block_on()` to keep the existing API, but this is a first up before making the whole API async. * Migrate most APIs to be Future-based I still need to finish a few of the more tricky ones that I've commented out for now, but most of it compiles and some examples work. In particular, `Docker::stats()` now properly returns an async stream of stats. * Fix events and containerinspect examples * Fix imageinspect, images, info and top examples * Fix containercreate, imagedelete and imagepull examples * Fix more examples * Add back debug statement in Transport::request * De-glob imports in examples * Remove unused imports in examples * Fix NetworkCreateOptions serialization * Add back error message extraction in Transport * Fix Container::create serialization of options * Add containerdelete example * Simplify result * Fix some error handling to remove unwrap() * Fix Image::export() * Fix imagebuild example * Add adapter from Stream of Chunks to AsyncRead Having an `AsyncRead` is required to be able to use the `FramedRead` and `Decoder` stuff from tokio_codec. This code is "borrowed" from https:/github.com/ferristseng/rust-ipfs-api though should probably be moved to its own crate or to tokio_codec. * Fix Container::logs() It now properly demuxes stdout/stderr, and returns a `Stream<Item = TtyLine>`. * Fix Container::export() * Use LineCodec for streaming JSON Although in my limited testing it seemed to work fine, there is no guarantee that 1 chunk == 1 piece of valid JSON. However, each JSON structure seems to be serialized on one line, so use LineCodec to turn the body into a stream of lines, then deserialize over this. * Fix serialization of ExecContainerOptions * Fix Container::exec() (kind of...) * Simplify deserialisation in Image::delete() * Small clean-ups * More clean ups * Fix rustdoc + remove extraneous "extern crate" * Fix doc example * Fix formatting
2018-10-17[OK] Expose port (#127)Nurrl
* Added the 'expose' function to ContainerOptionBuilder impl. (Closes #73, Replaces #74) * Forgot the , nevermind :ok_hand:
2018-10-13remove pub builder constructors (#125)doug tangren
2018-10-13rustfmtsoftprops
2018-10-10fix a number of clippy warnings (#122)doug tangren
2018-10-08try to get a consistent and repeatable codestyle goingsoftprops
2018-10-07Rename fields from rep structs to use snake caseAntoine Büsch
2018-10-01Clean-up imports and dependenciesAntoine Büsch
2018-10-01Fix testsAntoine Büsch
2018-10-01Migrate to serde_jsonAntoine Büsch
2018-09-29Merge branch 'master' into update-to-hyper-0.12Antoine Büsch
2018-08-07Update to Hyper 0.12Dylan McKay
2018-07-18feat: support --memoryMarc Schreiber
2018-07-06Merge pull request #76 from FauxFaux/build-networkdoug tangren
support for --network= during build
2018-07-03feat: create container with labelsMarc Schreiber
2018-05-20support for --network= during buildChris West (Faux)
2017-09-10Fix: Filter on multiples events of the same typeJacob Zak
Related to https://github.com/softprops/shiplift/issues/67
2017-09-09code style enforcementsoftprops
2017-06-25apply rustfmtsoftprops
2017-06-25replace all uses of try with ?. fixes #42softprops
2017-06-02Merge pull request #61 from Joxit/ExecContainerdoug tangren
[ExecContainer] exec can now return stdout and stderr #50
2017-05-06[ExecContainer] exec can now return stdout and stderr #50Joxit
2017-05-02Added an option for setting restart policyTim Martin
This requires support for integers in the parameter list, because the maximum retry count is an integer and Docker will not accept a string