Merge pull request #58 from AHCorn/main

fix: docker cache permission issue (#57)
This commit is contained in:
Krau
2025-05-08 20:44:46 +08:00
committed by GitHub

View File

@@ -11,8 +11,17 @@ RUN CGO_ENABLED=0 GOOS=linux go build -o saveany-bot .
FROM alpine:latest
RUN addgroup -S saveany && adduser -S saveany -G saveany
WORKDIR /app
RUN mkdir -p /app/data /app/downloads /app/cache && \
chown -R saveany:saveany /app
COPY --from=builder /app/saveany-bot .
CMD ["./saveany-bot"]
RUN chmod +x /app/saveany-bot
USER saveany
CMD ["./saveany-bot"]