forked from scylladb/latte
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (21 loc) · 769 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM rust:1.84-slim-bookworm AS builder
WORKDIR /usr/src/app
COPY . .
RUN --mount=type=cache,target=/var/cache/apt apt-get update && apt-get install -y \
build-essential \
cmake \
git \
libssl-dev \
pkg-config \
&& cargo build --release
FROM debian:bookworm-slim AS production
LABEL org.opencontainers.image.source="https://github.com/scylladb/latte"
LABEL org.opencontainers.image.title="ScyllaDB latte"
COPY --from=builder /usr/src/app/target/release/latte /usr/local/bin/latte
RUN --mount=type=cache,target=/var/cache/apt apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y libssl3 \
&& apt-get autoremove -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENTRYPOINT [ "latte" ]