Initial Commit
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
FROM rust:latest AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENV CARGO_HOME=/usr/local/cargo
|
||||
ENV CARGO_TARGET_DIR=/app/target
|
||||
|
||||
RUN apt-get update && apt-get install -y pkg-config libssl-dev
|
||||
|
||||
COPY Cargo.toml ./
|
||||
|
||||
# clean build (important)
|
||||
RUN cargo clean || true
|
||||
|
||||
RUN mkdir src && echo "fn main() {}" > src/main.rs
|
||||
RUN cargo build --release
|
||||
|
||||
RUN rm -rf src
|
||||
COPY src ./src
|
||||
|
||||
RUN cargo build --release
|
||||
Reference in New Issue
Block a user