forked from restsend/rustpbx
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (21 loc) · 762 Bytes
/
Copy pathDockerfile
File metadata and controls
25 lines (21 loc) · 762 Bytes
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
FROM rust:bookworm AS rust-builder
RUN apt-get update && apt-get install -y libasound2-dev libopus-dev
RUN mkdir /build
ADD . /build/
WORKDIR /build
RUN --mount=type=cache,target=/build/.cargo/registry \
--mount=type=cache,target=/build/target/release/incremental\
--mount=type=cache,target=/build/target/release/build\
cargo build --release --bin rustpbx
FROM debian:bookworm
LABEL maintainer="shenjindi@fourz.cn"
RUN --mount=type=cache,target=/var/apt apt-get update && apt-get install -y ca-certificates tzdata
ENV DEBIAN_FRONTEND=noninteractive
ENV LANG=C.UTF-8
WORKDIR /app
COPY --from=rust-builder /build/target/release/rustpbx /app/rustpbx
EXPOSE 25010/UDP
EXPOSE 5060/UDP
EXPOSE 8080/TCP
EXPOSE 12000-52000/UDP
ENTRYPOINT ["/app/rustpbx"]