This Docker image builds deb
packages from Rust projects using
cargo-deb.
docker build -t cargo-deb-runner .
To build the deb
package run the docker image from within the root directory of the Rust project,
mounting the directory as a volume. This will create the deb
package in the target/debian
directory.
docker run --rm -v ${PWD}:/builder cargo-deb-runner
Command like flags can also be passed to the build. For example, by default cargo-deb
appends a
-1
post tag to the version of the package. To exclude this set the deb-revision
flag.
docker run --rm -v ${PWD}:/builder cargo-deb-runner --deb-revision=""