-
Notifications
You must be signed in to change notification settings - Fork 15
/
Dockerfile
35 lines (25 loc) · 863 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
31
32
33
34
35
FROM rust:1.73.0-bullseye as builder
RUN apt-get update && \
apt-get install -y libopus-dev && \
rm -rf /var/lib/apt/lists/*
WORKDIR /root/koe
COPY . .
RUN --mount=type=cache,target=/root/.cargo/bin \
--mount=type=cache,target=/root/.cargo/registry/index \
--mount=type=cache,target=/root/.cargo/registry/cache \
--mount=type=cache,target=/root/.cargo/git/db \
--mount=type=cache,target=/root/koe/target \
cargo build --release --bin koe && \
cp target/release/koe /usr/local/bin/koe
###
FROM debian:bullseye-slim
RUN apt-get update && \
apt-get install -y ca-certificates ffmpeg && \
rm -rf /var/lib/apt/lists/*
# Switch to unpriviledged user
RUN useradd --user-group koe
USER koe
COPY --from=builder /usr/local/bin/koe /usr/local/bin/koe
ARG SENTRY_RELEASE
ENV SENTRY_RELEASE=$SENTRY_RELEASE
ENTRYPOINT ["koe"]