Skip to content

Instantly share code, notes, and snippets.

@terry90
terry90 / Dockerfile
Last active June 5, 2024 20:24
Rust Dockerfile to build really small containers with postgres and SSL (~20Mo with rocket and diesel). Dependencies are cached for faster builds.
FROM clux/muslrust as build
WORKDIR /app/
# Deps caching begins
COPY Cargo.toml .
COPY Cargo.lock .
RUN mkdir src
RUN echo "fn main() {}" > src/main.rs