2021-11-13 15:45:50 -07:00
|
|
|
FROM lukemathwalker/cargo-chef:latest-rust-1.56.1 AS chef
|
2021-04-20 14:53:07 -06:00
|
|
|
WORKDIR app
|
2021-11-13 15:45:50 -07:00
|
|
|
|
|
|
|
FROM chef AS planner
|
2021-04-20 14:53:07 -06:00
|
|
|
COPY . .
|
2021-11-13 15:45:50 -07:00
|
|
|
RUN cargo chef prepare --recipe-path recipe.json
|
2021-04-20 14:53:07 -06:00
|
|
|
|
2021-11-13 15:45:50 -07:00
|
|
|
FROM chef AS builder
|
2021-04-20 14:53:07 -06:00
|
|
|
COPY --from=planner /app/recipe.json recipe.json
|
|
|
|
RUN cargo chef cook --release --recipe-path recipe.json
|
|
|
|
|
|
|
|
COPY . .
|
|
|
|
RUN cargo build --release --bin atuin
|
|
|
|
|
2021-11-13 15:45:50 -07:00
|
|
|
FROM debian:bullseye-20211011-slim AS runtime
|
2021-04-20 14:53:07 -06:00
|
|
|
WORKDIR app
|
2021-04-21 11:13:51 -06:00
|
|
|
|
|
|
|
ENV TZ=Etc/UTC
|
2021-04-25 11:21:52 -06:00
|
|
|
ENV RUST_LOG=atuin::api=info
|
2021-04-21 11:13:51 -06:00
|
|
|
ENV ATUIN_CONFIG_DIR=/config
|
|
|
|
|
2021-04-20 14:53:07 -06:00
|
|
|
COPY --from=builder /app/target/release/atuin /usr/local/bin
|
|
|
|
ENTRYPOINT ["/usr/local/bin/atuin"]
|