mirror of
https://github.com/ellie/atuin.git
synced 2024-11-09 20:37:22 +03:00
156893d774
* Begin moving to sqlx for local too * Stupid scanners should just have a nice cup of tea Random internet shit searching for /.env or whatever * Remove diesel and rusqlite fully
29 lines
691 B
Docker
29 lines
691 B
Docker
FROM lukemathwalker/cargo-chef as planner
|
|
WORKDIR app
|
|
COPY . .
|
|
RUN cargo chef prepare --recipe-path recipe.json
|
|
|
|
FROM lukemathwalker/cargo-chef as cacher
|
|
WORKDIR app
|
|
COPY --from=planner /app/recipe.json recipe.json
|
|
RUN cargo chef cook --release --recipe-path recipe.json
|
|
|
|
FROM rust as builder
|
|
WORKDIR app
|
|
COPY . .
|
|
# Copy over the cached dependencies
|
|
COPY --from=cacher /app/target target
|
|
COPY --from=cacher $CARGO_HOME $CARGO_HOME
|
|
RUN cargo build --release --bin atuin
|
|
|
|
FROM debian:buster-slim as runtime
|
|
|
|
WORKDIR app
|
|
|
|
ENV TZ=Etc/UTC
|
|
ENV RUST_LOG=atuin::api=info
|
|
ENV ATUIN_CONFIG_DIR=/config
|
|
|
|
COPY --from=builder /app/target/release/atuin /usr/local/bin
|
|
ENTRYPOINT ["/usr/local/bin/atuin"]
|