mirror of
https://github.com/webrecorder/browsertrix-crawler.git
synced 2025-10-19 06:23:16 +00:00

* base: update to chrome 112 headless: switch to using new headless mode available in 112 which is more in sync with headful mode viewport: use fixed viewport matching screen dimensions for headless and headful mode (if GEOMETRY is set) profiles: fix catching new window message, reopening page in current window versions: bump to pywb 2.7.4, update puppeteer-core to (20.2.1) bump to 0.10.0-beta.4 * profile: force reopen in current window only for headless mode (currently breaks otherwise), remove logging messages
54 lines
1.4 KiB
Docker
54 lines
1.4 KiB
Docker
ARG BROWSER_VERSION=112
|
|
ARG BROWSER_IMAGE_BASE=webrecorder/browsertrix-browser-base:chrome-${BROWSER_VERSION}
|
|
|
|
FROM ${BROWSER_IMAGE_BASE}
|
|
|
|
# needed to add args to main build stage
|
|
ARG BROWSER_VERSION
|
|
|
|
ENV PROXY_HOST=localhost \
|
|
PROXY_PORT=8080 \
|
|
PROXY_CA_URL=http://wsgiprox/download/pem \
|
|
PROXY_CA_FILE=/tmp/proxy-ca.pem \
|
|
DISPLAY=:99 \
|
|
GEOMETRY=1360x1020x16 \
|
|
BROWSER_VERSION=${BROWSER_VERSION} \
|
|
BROWSER_BIN=google-chrome \
|
|
OPENSSL_CONF=/app/openssl.conf \
|
|
VNC_PASS=vncpassw0rd!
|
|
|
|
WORKDIR /app
|
|
|
|
ADD requirements.txt /app/
|
|
RUN pip install 'uwsgi==2.0.21'
|
|
RUN pip install -U setuptools; pip install -r requirements.txt
|
|
|
|
ADD package.json /app/
|
|
|
|
# to allow forcing rebuilds from this stage
|
|
ARG REBUILD
|
|
|
|
# Download and format ad host blocklist as JSON
|
|
RUN mkdir -p /tmp/ads && cd /tmp/ads && \
|
|
curl -vs -o ad-hosts.txt https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts && \
|
|
cat ad-hosts.txt | grep '^0.0.0.0 '| awk '{ print $2; }' | grep -v '0.0.0.0' | jq --raw-input --slurp 'split("\n")' > /app/ad-hosts.json && \
|
|
rm /tmp/ads/ad-hosts.txt
|
|
|
|
RUN yarn install --network-timeout 1000000
|
|
|
|
ADD *.js /app/
|
|
ADD util/*.js /app/util/
|
|
|
|
ADD config/ /app/
|
|
|
|
ADD html/ /app/html/
|
|
|
|
RUN ln -s /app/main.js /usr/bin/crawl; ln -s /app/create-login-profile.js /usr/bin/create-login-profile
|
|
|
|
WORKDIR /crawls
|
|
|
|
ADD docker-entrypoint.sh /docker-entrypoint.sh
|
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
|
|
|
CMD ["crawl"]
|
|
|