feat(docker): Rework Dockerfile into layered installs and add tooling (tini, chromium, MongoDB); simplify Alpine CI image Python/pip setup; add tsdocker devDependency; remove npmextra push flag; update README and registry links
This commit is contained in:
30
Dockerfile
30
Dockerfile
@@ -9,12 +9,11 @@ ENV NODE_VERSION_LTS="24.13.0" NODE_VERSION_STABLE="24.13.0" NVM_DIR="/usr/local
|
||||
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
|
||||
ENV CHROME_BIN=/usr/bin/chromium-browser
|
||||
|
||||
# Set debconf to run non-interactively and install packages
|
||||
# Layer 1: Base system + dev tools
|
||||
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections \
|
||||
&& apt-get update \
|
||||
&& apt-get upgrade --no-install-recommends -y \
|
||||
&& apt-get install -y -q --no-install-recommends \
|
||||
# base libs
|
||||
software-properties-common \
|
||||
apt-transport-https \
|
||||
build-essential \
|
||||
@@ -31,7 +30,13 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selectio
|
||||
ssh \
|
||||
wget \
|
||||
unzip \
|
||||
# puppeteer
|
||||
iputils-ping \
|
||||
dnsutils \
|
||||
tini
|
||||
|
||||
# Layer 2: Chromium + Puppeteer/Playwright browser deps
|
||||
RUN apt-get install -y -q --no-install-recommends \
|
||||
chromium-browser \
|
||||
libasound2t64 \
|
||||
libatk1.0-0 \
|
||||
libatk-bridge2.0-0 \
|
||||
@@ -63,30 +68,21 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selectio
|
||||
libxrender1 \
|
||||
libxss1 \
|
||||
libxtst6 \
|
||||
ca-certificates \
|
||||
fonts-liberation \
|
||||
libayatana-appindicator3-1 \
|
||||
libnss3 \
|
||||
lsb-release \
|
||||
xdg-utils \
|
||||
# network
|
||||
iputils-ping \
|
||||
dnsutils \
|
||||
# init
|
||||
tini \
|
||||
|
||||
# chromium (multi-arch compatible - works on both amd64 and arm64)
|
||||
&& apt-get install -y -q --no-install-recommends chromium-browser \
|
||||
|
||||
# mongodb 8.0
|
||||
&& curl -fsSL https://www.mongodb.org/static/pgp/server-8.0.asc | \
|
||||
xdg-utils
|
||||
|
||||
# Layer 3: MongoDB 8.0
|
||||
RUN curl -fsSL https://www.mongodb.org/static/pgp/server-8.0.asc | \
|
||||
gpg --dearmor -o /usr/share/keyrings/mongodb-server-8.0.gpg \
|
||||
&& echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-8.0.gpg ] https://repo.mongodb.org/apt/ubuntu noble/mongodb-org/8.0 multiverse" | \
|
||||
tee /etc/apt/sources.list.d/mongodb-org-8.0.list \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y -q --no-install-recommends mongodb-org \
|
||||
&& apt-get clean \
|
||||
&& rm -r /var/lib/apt/lists/*
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install nvm with node and npm
|
||||
RUN mkdir -p $NVM_DIR && curl https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
|
||||
|
||||
Reference in New Issue
Block a user