Crates.io | cargo-dockerfile |
lib.rs | cargo-dockerfile |
version | 0.1.0 |
source | src |
created_at | 2022-09-15 23:35:14.257042 |
updated_at | 2022-09-15 23:35:14.257042 |
description | cargo dockerfile is a cargo plugin for generating Dockerfiles out of your Rust project |
homepage | |
repository | https://github.com/GeorgeLS/cargo-dockerfile |
max_upload_size | |
id | 666966 |
size | 26,031 |
cargo dockerfile is a cargo plugin which allows you to create an optimal Dockerfile out of your cargo project.
The meaning of optimal here is within the context of build time. The resulting Dockerfile will create steps for building
each of your crates within the project separately, leveraging the docker layers. In that way, the first time you build
your project it may take more than it would by just running cargo build at the root of your project but subsequent builds
will take significantly less time since pretty much everything will be cached (based on what parts of the code you change every time).
cargo dockerfile will take care of any dependencies between your libaries and binaries so that everything is build in the correct order.
This plugin will allow you to build your cargo project but it doesn't guarantee that it will run as well.
Anything your program(s) need in order to run, you need to add those to the Dockerfile yourself (e.g specific command line arguments, env variables, etc).
You can specify some command line options so that the result Dockerfile is more complete: