feat: docker build

This commit is contained in:
2024-11-26 15:26:33 +00:00
parent e6c3b4e063
commit 54acb09d0f
4 changed files with 48 additions and 5 deletions

12
Dockerfile Normal file
View File

@ -0,0 +1,12 @@
ARG IMAGE=rust:bookworm
FROM $IMAGE AS build
WORKDIR /app/src
COPY . .
RUN apt update && apt -y install protobuf-compiler
RUN cargo install --path . --root /app/build
FROM $IMAGE AS runner
WORKDIR /app
COPY --from=build /app/build .
ENTRYPOINT ["./bin/api"]