mirror of
https://github.com/eduard256/Strix
synced 2026-04-21 21:47:47 +00:00
26 lines
501 B
Docker
26 lines
501 B
Docker
FROM golang:1.26-alpine AS builder
|
|
|
|
WORKDIR /src
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
|
|
ARG VERSION=dev
|
|
RUN CGO_ENABLED=0 go build -ldflags "-s -w -X main.version=${VERSION}" -o /strix .
|
|
|
|
FROM alpine:latest
|
|
|
|
RUN apk add --no-cache ffmpeg ca-certificates
|
|
|
|
COPY --from=builder /strix /usr/local/bin/strix
|
|
|
|
WORKDIR /app
|
|
COPY cameras.db .
|
|
|
|
EXPOSE 4567
|
|
|
|
HEALTHCHECK --interval=30s --timeout=3s CMD wget -q --spider http://localhost:4567/api/health || exit 1
|
|
|
|
USER nobody
|
|
ENTRYPOINT ["strix"]
|