diff --git a/Dockerfile b/Dockerfile index eb44621..ebdf55d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM python:3.9 RUN echo "deb http://mirrors.aliyun.com/debian/ buster main contrib non-free\ndeb http://mirrors.aliyun.com/debian/ buster-updates main contrib non-free" > /etc/apt/sources.list && \ - apt-get update && apt-get install -y fonts-wqy-microhei + apt-get update && apt-get install -y fonts-wqy-microhei chromium RUN python3 -m pip config set global.index-url https://mirrors.aliyun.com/pypi/simple RUN python3 -m pip install poetry && poetry config virtualenvs.create false WORKDIR /app diff --git a/src/plugins/hk_reporter/utils.py b/src/plugins/hk_reporter/utils.py index 14b3c04..1d89ea2 100644 --- a/src/plugins/hk_reporter/utils.py +++ b/src/plugins/hk_reporter/utils.py @@ -21,9 +21,9 @@ class Render(metaclass=Singleton): async def init(self): if plugin_config.hk_reporter_use_local: - browser = await launch(executablePath='/usr/bin/chromium') + browser = await launch(executablePath='/usr/bin/chromium', args=['--no-sandbox']) else: - browser = await launch() + browser = await launch(args=['--no-sandbox']) self.page = await browser.newPage() async def text_to_pic(self, text: str) -> str: