-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (31 loc) · 922 Bytes
/
Copy pathDockerfile
File metadata and controls
38 lines (31 loc) · 922 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
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM rust:slim-bookworm AS builder
RUN apt-get update && apt-get install -y --no-install-recommends \
pkg-config \
libssl-dev \
glib-2.0 \
libcairo2-dev \
pkg-config \
libpango1.0-dev \
libatk1.0-dev \
libgtk-3-dev \
libxdo-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /build
COPY . .
RUN cargo build --release --workspace
FROM debian:bookworm-slim AS runtime
RUN apt-get update && apt-get install -y --no-install-recommends \
libssl3 \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
RUN useradd --no-create-home --shell /bin/false bytehive
WORKDIR /app
COPY --from=builder /build/target/release/bytehive /app/bytehive
RUN mkdir -p /app/config /data/filesync \
&& chown -R bytehive:bytehive /app /data
USER bytehive
# 9000 HTTP portal / dashboard
# 7878 FileSync TCP
EXPOSE 9000 7878
ENTRYPOINT ["/app/bytehive"]
CMD ["--config", "/app/config/config.toml"]