fej/Dockerfile

19 lines
374 B
Docker
Raw Normal View History

2021-03-05 20:40:49 +01:00
# syntax=docker/dockerfile:1.2
FROM rustlang/rust:nightly AS builder
WORKDIR /usr/src/app
# Build the app
COPY . .
RUN --mount=type=cache,target=/usr/src/app/target cargo install --path .
FROM debian:buster-slim
2021-03-13 10:41:44 +01:00
# Install dependencies
RUN apt update && apt install -y openssl
2021-03-05 20:40:49 +01:00
COPY --from=builder /usr/local/cargo/bin/rust-api /usr/local/bin/rust-api
CMD ["rust-api"]