Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Not working on s390x

未关闭
#676 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
30/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
docker, node.js
领域
backend, devops

调研方向

从提供的 Dockerfile 和 highcharts-export-server 命令开始,然后在 s390x 上复现容器构建和运行时环境。比较 amd64 构建阶段与 s390x 最终镜像,并记录或实现使导出服务器能够在 s390x 上成功启动并处理请求所需的更改。

由索引模型根据 Issue 内容生成。

描述

i tried containerizing it here is the docker file.

---- Stage 1: The AMD64 Builder (with Firefox) ----

We explicitly set the platform for this stage to amd64

FROM --platform=linux/amd64 amd64/node:22-slim AS builder-amd64

ENV DEBIAN_FRONTEND=noninteractive

1. Install Firefox and its dependencies needed FOR THE BUILD on amd64

RUN apt-get update &&
apt-get install -y --no-install-recommends
tini
firefox-esr
libdbus-glib-1-2
libgtk-3-0
libasound2
pciutils
libgl1
xvfb
xauth
x11-utils
&& rm -rf /var/lib/apt/lists/*

2. Configure Puppeteer to use our system-installed Firefox

ENV PUPPETEER_SKIP_DOWNLOAD=true
PUPPETEER_PRODUCT="firefox"
PUPPETEER_EXECUTABLE_PATH="/usr/bin/firefox-esr"

WORKDIR /app

3. Copy and install dependencies. This happens on a stable amd64 container.

COPY package.json .
RUN npm install

4. Manually create the cache directory.

RUN mkdir /app/cache

5. Warm up the cache. This runs on a stable amd64 environment.

RUN node_modules/.bin/highcharts-export-server
--cache-path /app/cache
-options '{"title":{"text":"Cache Warm-up"}}'
-outfile /dev/null
--puppeteer-args '["--no-sandbox", "--disable-setuid-sandbox"]'

---- Stage 2: The Final S390X Slim Image ----

---- Stage 2: The Final S390X Slim Image ----

FROM s390x/node:22-slim

Install ALL runtime dependencies for Firefox

RUN apt-get update &&
apt-get install -y --no-install-recommends
tini
firefox-esr
libdbus-glib-1-2
libgtk-3-0
libasound2
fonts-liberation
pciutils
libgl1
xvfb
xauth
x11-utils
&& rm -rf /var/lib/apt/lists/*

Pre-create X11 directory with correct permissions

RUN mkdir -p /tmp/.X11-unix &&
chmod 1777 /tmp/.X11-unix &&
mkdir -p /tmp/.ICE-unix &&
chmod 1777 /tmp/.ICE-unix

Set environment variables

ENV PUPPETEER_SKIP_DOWNLOAD=true
PUPPETEER_PRODUCT="firefox"
PUPPETEER_EXECUTABLE_PATH="/usr/bin/firefox-esr"
DISPLAY=:99
XAUTHORITY=/tmp/.Xauthority

Create user and directories

RUN useradd --create-home --shell /bin/bash appuser
WORKDIR /home/appuser/app

Copy artifacts from builder

COPY --from=builder-amd64 --chown=appuser:appuser /app/cache /home/appuser/app/cache
COPY --from=builder-amd64 --chown=appuser:appuser /app/node_modules /home/appuser/app/node_modules
COPY --from=builder-amd64 --chown=appuser:appuser /app/package.json .

Create directories and set permissions

RUN mkdir -p log tmp &&
chown -R appuser:appuser log tmp /tmp/.X11-unix /tmp/.ICE-unix

USER appuser

EXPOSE 3001
ENTRYPOINT ["/usr/bin/tini","--"]

Run with xvfb-run

CMD [
"xvfb-run",
"-a",
"-e", "/dev/stdout",
"--server-args=-screen 0 1920x1080x24 -ac -nolisten tcp",
"node_modules/.bin/highcharts-export-server",
"--enableServer", "1",
"--port", "3001",
"--no-internet",
"--cache-path", "/home/appuser/app/cache",
"--log-dest", "/dev/stdout",
"--puppeteer-args", "["--no-sandbox", "--disable-setuid-sandbox", "--disable-dev-shm-usage", "--disable-gpu", "--no-zygote", "--headless"]"
]

主要语言
JavaScript
星标
368
派生
265
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

highcharts/node-export-server 的其他 Issue

查看 highcharts/node-export-server 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。