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 # Final Stage
FROM alpine:latest FROM alpine:latest
# Create non-root user WORKDIR /app
RUN addgroup -g 1000 appuser && \
adduser -D -u 1000 -G appuser appuser
WORKDIR /home/appuser
COPY --from=builder /app/server . COPY --from=builder /app/server .
# Create directory for sqlite db # Create directory for sqlite db
RUN mkdir -p data && chown -R appuser:appuser /home/appuser RUN mkdir -p data
USER appuser
EXPOSE 8000 EXPOSE 8000

View File

@@ -45,7 +45,7 @@ The server will start on port 8000 with an interactive REPL for user management.
docker build -t calspot . docker build -t calspot .
# Run the container # Run the container
docker run -it -p 8000:8000 -v $(pwd)/data:/home/appuser/data calspot docker run -it -p 8000:8000 -v $(pwd)/data:/app/data calspot
``` ```
## User Management (REPL) ## User Management (REPL)