fix: docker cache permission issue (#57)
This commit is contained in:
11
Dockerfile
11
Dockerfile
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user