Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Not working on s390x

Đang mở
#676 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
30/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
docker, node.js
Lĩnh vực
backend, devops

Hướng nghiên cứu

Bắt đầu với Dockerfile được cung cấp và lệnh highcharts-export-server, sau đó tái hiện quá trình build và runtime của container trên s390x. So sánh build stage amd64 với final image s390x, đồng thời ghi lại hoặc triển khai các thay đổi cần thiết để export server khởi động và phục vụ request thành công trên s390x.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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"]"
]

Ngôn ngữ chính
JavaScript
Star
368
Fork
266
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

  • Có Dockerfile hoặc tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của highcharts/node-export-server

Tất cả issue của highcharts/node-export-server

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.