feat: enhance Dockerfile for Playwright#6
Merged
Conversation
- Install system dependencies for Playwright including Chromium and font packages. - Configure Playwright to use the installed Chromium in Docker. - Add a function to set the font family for Mermaid diagrams, supporting custom overrides and ensuring Chinese font compatibility.
hustcc
reviewed
Jul 31, 2025
| /** | ||
| * Get font family for Mermaid diagrams | ||
| */ | ||
| function getFontFamily(): string { |
Owner
There was a problem hiding this comment.
这个是不是加到 tool 的配置中更好?而不是用 env 去设置。
Contributor
Author
There was a problem hiding this comment.
设置font family主要是考虑解决容器内中文和特殊字符无法渲染的问题,也可以改成命令行指定优先使用的字体,就是代码改动范围稍大。
Owner
There was a problem hiding this comment.
mermaid 肯定有自己默认的字体,如果容器中出现字体问题应该是补齐容器中的字体文件吧!
- Introduced .dockerignore to exclude unnecessary files from Docker context. - Updated Dockerfile to streamline dependency installation and build process, including Playwright with system Chromium.
Contributor
Author
|
cc @hustcc simplify PR content docker build -t mcp-mermaid .
# run with sse mode
docker run -dit -p 3033:3033 --name mermaid mcp-mermaid:latest node build/index.js -t sse |
hustcc
approved these changes
Aug 2, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.