aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2024-07-06 17:51:45 -0700
committerJeff Halter <868228+jhalter@users.noreply.github.com>2024-07-06 18:01:15 -0700
commitd4207f0da06f9578a5d89f47f126ce5343c162bd (patch)
tree5f4e706ed3afee877c9368b805763d95eaef722c /Dockerfile
parent6dabc6b44f27f0aa936a7f9518aa6bc1243d9001 (diff)
Remove user from Dockerfile
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile11
1 files changed, 2 insertions, 9 deletions
diff --git a/Dockerfile b/Dockerfile
index 75f324b..ee33b0e 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -5,18 +5,11 @@ COPY . .
RUN CGO_ENABLED=0 go build -o /app/server cmd/mobius-hotline-server/main.go && chmod a+x /app/server
-FROM debian:stable-slim
-
-# Change these as you see fit. This makes bind mounting easier so you don't have to edit bind mounted config files as root.
-ARG USERNAME=mobius
-ARG UID=1001
-ARG GUID=1001
+FROM scratch
COPY --from=builder /app/server /app/server
COPY --from=builder /app/cmd/mobius-hotline-server/mobius/config /usr/local/var/mobius/config
-RUN useradd -d /app -u ${UID} ${USERNAME}
-RUN chown -R ${USERNAME}:${USERNAME} /app
+
EXPOSE 5500 5501
-USER ${USERNAME}
ENTRYPOINT ["/app/server"]