Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FROM rust:latest
- ARG PACKAGE_NAME=package_name
- WORKDIR /opt/$PACKAGE_NAME
- RUN rustup target add x86_64-unknown-linux-musl
- ADD Cargo.* ./
- ADD . .
- RUN cargo build --release --target=x86_64-unknown-linux-musl
- RUN mv target/x86_64-unknown-linux-musl/release/$PACKAGE_NAME /opt/bin
- FROM scratch
- COPY --from=0 /opt/bin .
- ENTRYPOINT ["./bin"]
Add Comment
Please, Sign In to add comment