docker - 如何在 Windows 10 中使用 Docker 中的 thenets/parsoid 将本地文本文件转换为 html?
问题描述
我已经在 Windows 10 上的 Docker 上安装了thenets/parsoid。我想将pomme.txt
带有目录路径的文本转换F:\zim\pomme.txt
为 html。我试过了
docker run --name myparsoid -d -t -i -v /f/zim:/zim thenets/parsoid:latest sh
type /zim/pomme.txt | docker exec myparsoid node bin/parse.js --wt2html --offline
但它返回一个错误
Microsoft Windows [Version 10.0.19042.928]
(c) Microsoft Corporation. All rights reserved.
C:\Users\Akira>docker run --name myparsoid -d -t -i -v /f/zim:/zim thenets/parsoid:latest sh
7912b0cef8fba4244b2519f4f9603ec8e278b67bcc4fe08f4658721b98f941f3
C:\Users\Akira>type /zim/pomme.txt | docker exec myparsoid node bin/parse.js --wt2html --offline
The syntax of the command is incorrect.
internal/modules/cjs/loader.js:638
throw err;
^
Error: Cannot find module '/bin/parse.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
我非常不清楚使用哪个命令将本地文本文件转换为 html。您能否详细说明如何解决此问题?
解决方案
推荐阅读
- bash - BASH 测试文件名是否以 .dylib 结尾
- cypress - 寻找一种方法,您可以在 it 块之外对我的所有自定义命令使用赛普拉斯夹具
- r - Write.csv 写入 unix 可执行文件 mac
- java - 从 db2 数据库 Spring Boot 在内存数据库中填充 h2
- node.js - 通过 NestJs 框架通过 Passport Facebook 登录
- python - 如何在虚拟环境中(在 Windows 中)升级 python 版本?
- javascript - 将数据表导出到多个工作表中
- python - Python Numpy矩阵乘法使用循环将多个矩阵相乘
- python - Pandas 中的日期和月份混淆
- ruby - 有没有办法减少对 ruby 进程的互联网访问?