-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (25 loc) · 919 Bytes
/
Dockerfile
File metadata and controls
36 lines (25 loc) · 919 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
# Build stage
FROM golang:1.26-bookworm AS builder
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -o /vedetta ./cmd/vedetta
# Runtime stage
FROM debian:bookworm-slim
LABEL org.opencontainers.image.source=https://github.com/rvben/vedetta
LABEL org.opencontainers.image.description="Vedetta NVR - lightweight network video recorder"
LABEL org.opencontainers.image.licenses=MIT
RUN apt-get update && \
apt-get install -y --no-install-recommends ca-certificates && \
rm -rf /var/lib/apt/lists/*
RUN groupadd -r vedetta && useradd -r -g vedetta -d /data -s /sbin/nologin vedetta
RUN mkdir -p /data/recordings /data/snapshots /config && \
chown -R vedetta:vedetta /data /config
COPY --from=builder /vedetta /usr/local/bin/vedetta
USER vedetta
WORKDIR /data
EXPOSE 5050
VOLUME ["/data", "/config"]
ENTRYPOINT ["vedetta"]
CMD ["-config", "/config/config.yml"]