This is deprecated. Use cross instead.
Rust builder image and run time image
for s2i.
The images are pushed to Dockerhub
- 1.14.0, latest (
Dockerfile)
- runtime (
Dockerfile)
For the Builder image, simply docker build -t rust-s2i:1.14.0 ..
To build the runtime image, you use docker build -t rust-s2i:runtime runtime
If you want a portable Rust toolchain environment, you can simply extend your Dockerfiles from
lawliet89/rust-s2i.
The real usage comes from using s2i to build your Rust applications and transplant them to a lean runtime image
without the need for the Rust toolchain.
s2i build \
/path/to/test-app \
lawliet89/rust-s2i:1.14.0 \
test-app \
--runtime-image lawliet89/rust-s2i:runtime \
-e RUST_BINARY="my_app"RUST_BINARY: This is the name of the binary to run in both the builder image and the runtime image.
If you would like to extract your Rust binaries, simply start a container with the image you just built,
and use docker cp to copy the binaries.