]> git.r.bdr.sh - rbdr/mobius/blame - Dockerfile
Add files via upload
[rbdr/mobius] / Dockerfile
CommitLineData
2327c11f 1FROM golang:1.22 AS builder
6988a057
JH
2
3WORKDIR /app
4COPY . .
5
bc385afd 6RUN CGO_ENABLED=0 go build -o /app/server cmd/mobius-hotline-server/main.go && chmod a+x /app/server
6988a057 7
5f81c5c8
CJ
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
75b7ce6f 14
bc385afd 15COPY --from=builder /app/server /app/server
75b7ce6f 16COPY --from=builder /app/cmd/mobius-hotline-server/mobius/config /usr/local/var/mobius/config
5f81c5c8
CJ
17RUN useradd -d /app -u ${UID} ${USERNAME}
18RUN chown -R ${USERNAME}:${USERNAME} /app
75b7ce6f 19EXPOSE 5500 5501
bddd9d4a 20
5f81c5c8 21USER ${USERNAME}
8796b449 22ENTRYPOINT ["/app/server"]