23 lines
785 B
Docker
23 lines
785 B
Docker
# lvmh daemon image. Build from repo root:
|
|
# docker build -f daemon/Dockerfile -t lvmh-daemon:latest .
|
|
# To bake the real web UI, copy web/dist over the placeholder first:
|
|
# cp -r web/dist daemon/webdist/
|
|
FROM golang:1.24-alpine AS build
|
|
WORKDIR /src
|
|
COPY daemon/go.mod daemon/go.sum ./
|
|
RUN go mod download
|
|
COPY daemon/ ./
|
|
RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/lvmh-daemon .
|
|
|
|
FROM alpine:3.21
|
|
RUN apk add --no-cache ca-certificates git
|
|
WORKDIR /app
|
|
COPY --from=build /out/lvmh-daemon /app/lvmh-daemon
|
|
# Placeholder UI; replace via build (cp web/dist daemon/webdist) or mount at
|
|
# /app/web-dist and rely on the --webdist default.
|
|
COPY --from=build /src/webdist /app/web-dist
|
|
VOLUME /data
|
|
EXPOSE 8686
|
|
ENV LVMH_DB=/data/lvmh.db
|
|
ENTRYPOINT ["/app/lvmh-daemon"]
|