mirror of
https://github.com/mrfluffy-dev/assignment.git
synced 2026-01-17 05:40:34 +00:00
added dockerfile to make a docker image
This commit is contained in:
13
Dockerfile
Normal file
13
Dockerfile
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
FROM rust:latest as builder
|
||||||
|
WORKDIR /usr/src/methoddata
|
||||||
|
COPY . .
|
||||||
|
RUN apt-get update && apt-get install -y libssl-dev pkg-config
|
||||||
|
RUN rustup target add x86_64-unknown-linux-gnu
|
||||||
|
RUN cargo build --release --target x86_64-unknown-linux-gnu
|
||||||
|
|
||||||
|
FROM debian:bookworm-slim
|
||||||
|
WORKDIR /usr/local/bin/
|
||||||
|
RUN apt-get update && apt-get install -y libssl3 curl
|
||||||
|
COPY --from=builder /usr/src/methoddata/target/x86_64-unknown-linux-gnu/release/methoddata .
|
||||||
|
COPY public /public
|
||||||
|
CMD ["./methoddata"]
|
||||||
Reference in New Issue
Block a user