mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 00:11:37 -06:00
fix(docker): rebuild kepubify with Go 1.26.3, fix read-only fs chmod
Replaced pre-compiled kepubify binaries (built with Go 1.17.8, 53 HIGH/CRITICAL CVEs) with binaries rebuilt from source using Go 1.26.3 and golang.org/x/text upgraded to v0.3.8, resolving all fixable CVEs. Also fixed KepubifyBinaryService incorrectly falling back to downloading the binary on every startup in read-only containers. chmod() was throwing EROFS, and the single catch block treated it as a missing file. Split stat and chmod into separate try/catch so only a missing-file error triggers the download fallback.
This commit is contained in:
+2
-1
@@ -50,8 +50,9 @@ ENV PORT=3000
|
||||
COPY --from=server-builder --chown=node:node /deploy ./
|
||||
COPY --from=client-builder --chown=node:node /app/client/dist ./public
|
||||
COPY --from=server-builder --chown=node:node /app/server/entrypoint.sh ./entrypoint.sh
|
||||
COPY --chown=node:node server/bin/kepubify/ ./bin/kepubify/
|
||||
|
||||
RUN chmod +x /app/entrypoint.sh && mkdir -p /books /data/covers /data/book-bucket /tmp && chown -R node:node /data /tmp
|
||||
RUN chmod +x /app/entrypoint.sh /app/bin/kepubify/* && mkdir -p /books /data/covers /data/book-bucket /tmp && chown -R node:node /data /tmp
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
|
||||
Reference in New Issue
Block a user