Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker内でrake epubを実行したときに、css, imagesが0ファイルになる #1686

Closed
kmuto opened this issue Apr 25, 2021 · 3 comments

Comments

@kmuto
Copy link
Owner

kmuto commented Apr 25, 2021

vvakame/review:latest (Re:VIEW 5.1.1)環境で実行

Archive:  book.epub
  Length      Date    Time    Name
---------  ---------- -----   ----
       20  2021-04-25 13:24   mimetype
      250  2021-04-25 13:24   META-INF/container.xml
      452  2021-04-25 13:24   OEBPS/vscli.xhtml
        0  2021-04-25 13:24   OEBPS/style.css
      561  2021-04-25 13:24   OEBPS/book.xhtml
        0  2021-04-25 13:24   OEBPS/images/cover.jpg
      649  2021-04-25 13:24   OEBPS/book-toc.xhtml
      575  2021-04-25 13:24   OEBPS/titlepage.xhtml
     2136  2021-04-25 13:24   OEBPS/book.opf
---------                     -------
     4643                     9 files
  • ネイティブなDebian環境では問題なし
  • DockerでもREVIEW_EPUB_OPTIONS="-d" rake epubとすれば問題なし
  • remove_entry_secureのところで何かタイミングがおかしい?(逆にWindowsだとまたおかしくなるかも…)
@kmuto
Copy link
Owner Author

kmuto commented Apr 25, 2021

ではなくて、EPUB3::produceの時点ですでに0バイトなのでおかしい。コピーのところが変なようだ。

@m-shibata
Copy link
Sponsor Contributor

m-shibata commented Apr 25, 2021

関係ないかもしれませんが、以前Docker+Re:VIEWな環境で、FileUtils.cpをするとコピー先のファイルサイズが0になるという問題にはまりました(kmutoさんにもいろいろ相談にのってもらいました)。

どうもoverlayfsかtmpfsがらみでメタデータの同期がうまく動いていないような感じです。また、デバッグモードだとtmpfsにコピーしないので起きない状態でした。

原因自体はわからなかったので、手元のプロジェクトではconfig.yamlのhook_aftercopyimageとhook_prepackから「find $1 -exec touch {} \;」を実行するだけのシェルスクリプトを叩くようにしています。

参考までにそのときの調査内容: https://twitter.com/MurabitoL/status/1345610258681483264

@kmuto
Copy link
Owner Author

kmuto commented Apr 25, 2021

そうか、以前にあったような…とおぼろげな記憶でした。ありがとうございます。今後もずっと困りそうなので、preserveしてしまうか…。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants