From c4bf30d302a0d79384a09ed1a69c45aac80e6113 Mon Sep 17 00:00:00 2001 From: Patrick Robertson Date: Sun, 23 Mar 2025 13:23:54 +0400 Subject: [PATCH] Dockerfile for scoop --- Dockerfile | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 68aed42..c5ed555 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM webrecorder/browsertrix-crawler:1.4.2 AS base +FROM ubuntu:noble AS base ENV RUNNING_IN_DOCKER=1 \ LANG=C.UTF-8 \ @@ -11,9 +11,14 @@ ENV RUNNING_IN_DOCKER=1 \ ARG TARGETARCH # Installing system dependencies -RUN add-apt-repository ppa:mozillateam/ppa && \ +RUN apt-get update && \ + apt install -y --no-install-recommends software-properties-common && \ + add-apt-repository ppa:mozillateam/ppa && \ apt-get update && \ - apt-get install -y --no-install-recommends gcc ffmpeg fonts-noto exiftool && \ + apt-get install -y --no-install-recommends ca-certificates build-essential python3-pip python3-dev python3-venv gcc wget ffmpeg fonts-noto exiftool \ + fonts-arphic-ukai fonts-arphic-uming fonts-freefont-ttf fonts-gfs-neohellenic fonts-indic fonts-ipafont-mincho fonts-ipafont-gothic fonts-kacst \ + fonts-liberation fonts-noto-cjk fonts-noto-color-emoji fonts-roboto fonts-stix fonts-thai-tlwg fonts-sil-padauk fonts-ubuntu fonts-unfonts-core fonts-wqy-zenhei \ + && \ apt-get install -y --no-install-recommends firefox-esr && \ ln -s /usr/bin/firefox-esr /usr/bin/firefox @@ -35,6 +40,18 @@ RUN if [ $(uname -m) = "aarch64" ]; then \ # Poetry and runtime FROM base AS runtime +# Download and install node + Scoop +RUN wget -q -O - https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.2/install.sh | bash \ +&& . "$HOME/.nvm/nvm.sh" \ +&& nvm install 23 && nvm use 23 + +# Install Scoop - global install so `scoop` is available in the PATH +RUN . "$HOME/.nvm/nvm.sh" && npm install -g @harvard-lil/scoop && \ +npx playwright install-deps chromium && \ +corepack enable yarn + + + ENV POETRY_NO_INTERACTION=1 \ POETRY_VIRTUALENVS_IN_PROJECT=1 \ POETRY_VIRTUALENVS_CREATE=1