use root instead of 1000

This commit is contained in:
2026-01-11 21:50:33 +00:00
parent 010b36789c
commit c2232a8d7c
2 changed files with 3 additions and 9 deletions

View File

@@ -19,18 +19,12 @@ RUN go build -o server main.go
# Final Stage
FROM alpine:latest
# Create non-root user
RUN addgroup -g 1000 appuser && \
adduser -D -u 1000 -G appuser appuser
WORKDIR /home/appuser
WORKDIR /app
COPY --from=builder /app/server .
# Create directory for sqlite db
RUN mkdir -p data && chown -R appuser:appuser /home/appuser
USER appuser
RUN mkdir -p data
EXPOSE 8000