Files
Bellhop/Dockerfile
prosolis 8f38d3d9f4 Switch config format from YAML to TOML
Replaces gopkg.in/yaml.v3 with github.com/BurntSushi/toml. Updates
struct tags, default config path, Dockerfile CMD, README, and ships
config.example.toml in place of the YAML example. ${ENV_VAR}
expansion still runs on the raw file before parsing, so the behavior
is unchanged.
2026-05-24 21:05:41 -07:00

22 lines
616 B
Docker

# syntax=docker/dockerfile:1
FROM golang:1.25-alpine AS build
RUN apk add --no-cache build-base
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
# goolm = pure-Go olm; sqlite needs cgo for the device/crypto stores.
ENV CGO_ENABLED=1
RUN go build -tags goolm -trimpath -ldflags="-s -w" -o /out/bellhop ./
FROM alpine:3.21
RUN apk add --no-cache ca-certificates tzdata
RUN addgroup -S bellhop && adduser -S -G bellhop bellhop
WORKDIR /app
COPY --from=build /out/bellhop /usr/local/bin/bellhop
USER bellhop
VOLUME ["/app/data"]
ENTRYPOINT ["/usr/local/bin/bellhop"]
CMD ["-config", "/app/config.toml"]