]> git.r.bdr.sh - rbdr/mobius/blame_incremental - Dockerfile
Refactoring and cleanup
[rbdr/mobius] / Dockerfile
... / ...
CommitLineData
1FROM golang:1.22 AS builder
2
3WORKDIR /app
4COPY . .
5
6RUN CGO_ENABLED=0 go build -o /app/server cmd/mobius-hotline-server/main.go && chmod a+x /app/server
7
8FROM debian:stable-slim
9
10# Change these as you see fit. This makes bind mounting easier so you don't have to edit bind mounted config files as root.
11ARG USERNAME=mobius
12ARG UID=1001
13ARG GUID=1001
14
15COPY --from=builder /app/server /app/server
16COPY --from=builder /app/cmd/mobius-hotline-server/mobius/config /usr/local/var/mobius/config
17RUN useradd -d /app -u ${UID} ${USERNAME}
18RUN chown -R ${USERNAME}:${USERNAME} /app
19EXPOSE 5500 5501
20
21USER ${USERNAME}
22ENTRYPOINT ["/app/server"]