fix: ensure tmp folder is present on docker container (#910)

* chore: add logger to bookmark update cache

* ensure there's a tmp folder in the container
This commit is contained in:
Felipe Martin 2024-05-15 17:02:59 +02:00 committed by GitHub
parent 647945c54e
commit 4de4799ef8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View file

@ -8,7 +8,8 @@ ARG TARGETOS
ARG TARGETVARIANT ARG TARGETVARIANT
COPY dist/shiori_${TARGETOS}_${TARGETARCH}${TARGETVARIANT}/shiori /usr/bin/shiori COPY dist/shiori_${TARGETOS}_${TARGETARCH}${TARGETVARIANT}/shiori /usr/bin/shiori
RUN apk add --no-cache ca-certificates tzdata && \ RUN apk add --no-cache ca-certificates tzdata && \
chmod +x /usr/bin/shiori chmod +x /usr/bin/shiori && \
rm -rf /tmp/*
# Server image # Server image
FROM scratch FROM scratch
@ -20,6 +21,7 @@ WORKDIR ${SHIORI_DIR}
LABEL org.opencontainers.image.source="https://github.com/go-shiori/shiori" LABEL org.opencontainers.image.source="https://github.com/go-shiori/shiori"
LABEL maintainer="Felipe Martin <github@fmartingr.com>" LABEL maintainer="Felipe Martin <github@fmartingr.com>"
COPY --from=builder /tmp /tmp
COPY --from=builder /usr/bin/shiori /usr/bin/shiori COPY --from=builder /usr/bin/shiori /usr/bin/shiori
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt

View file

@ -217,6 +217,11 @@ func (r *BookmarksAPIRoutes) updateCache(c *gin.Context) {
content.Close() content.Close()
if err != nil { if err != nil {
r.logger.WithFields(logrus.Fields{
"bookmark_id": book.ID,
"url": book.URL,
"error": err,
}).Error("error downloading bookmark cache")
chProblem <- book.ID chProblem <- book.ID
return return
} }