mirror of
https://github.com/atuinsh/atuin.git
synced 2024-11-26 10:15:37 +01:00
a21737e2b7
* Switch to Cargo workspaces Breaking things into "client", "server" and "common" makes managing the codebase much easier! client - anything running on a user's machine for adding history server - handles storing/syncing history and running a HTTP server common - request/response API definitions, common utils, etc * Update dockerfile
23 lines
615 B
Docker
23 lines
615 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
|
|
COPY --from=builder /app/target/release/atuin /usr/local/bin
|
|
ENTRYPOINT ["/usr/local/bin/atuin"]
|