numq / dockerize-rust

Docker Multi-stage Build for Tiny Rust Image Deployment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dockerize Rust

Docker Multi-stage Build for Tiny Rust Image Deployment based on linux musl.

*Multi-stage - this is a way to reduce an image size creating an empty image and copying the binary file into it.

  • First stage
    • Create a new image
    • Install dependencies
    • Build binaries
  • Second stage
    • Create a new image
    • Copy binaries
    • Launch

Run:

docker compose up [OPTIONS] [SERVICE...]

About

Docker Multi-stage Build for Tiny Rust Image Deployment

License:MIT License


Languages

Language:Rust 83.5%Language:Dockerfile 16.5%