Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

For arm64(RPI4B) chromium is the only option #8

Open
myfingerhurt opened this issue Feb 12, 2023 · 1 comment
Open

For arm64(RPI4B) chromium is the only option #8

myfingerhurt opened this issue Feb 12, 2023 · 1 comment

Comments

@myfingerhurt
Copy link

Create a debian-stable.list file containing:

deb [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://deb.debian.org/debian stable main
deb-src [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://deb.debian.org/debian stable main

deb [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://deb.debian.org/debian-security/ stable-security main
deb-src [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://deb.debian.org/debian-security/ stable-security main

deb [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://deb.debian.org/debian stable-updates main
deb-src [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://deb.debian.org/debian stable-updates main

Dockerfile for arm64, not tested.

FROM node:19
WORKDIR /app

COPY debian-stable.list /etc/apt/sources.list.d/debian-stable.list
RUN apt-get install -y wget curl gnupg  \
  && apt-get update && apt-get -y install chromium xvfb \
  && alias google-chrome="chromium" \
  && echo "Chrome: " && google-chrome --version \
  && ln -s /usr/bin/chromium /usr/bin/google-chrome-stable

COPY package.json .
COPY package-lock.json .
RUN npm install
COPY . .
RUN npm run build
EXPOSE 4000
CMD npx prisma migrate deploy && xvfb-run --server-args="-screen 0 1280x800x24 -ac -nolisten tcp -dpi 96 +extension RANDR -maxclients 2048" node dist/index.js

For testing:

docker build .
docker container run --name mychatapi3 -p 4000:4000 -it --mount type=bind,source=${PWD}/data,target=/app/data mychatapi-single bash
docker commit mychatapi3 mychatapi-single:v1

The original answer is here

@fuergaosi233
Copy link
Contributor

Could you create a PR?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants