youtube-trusted-session-gen.../Dockerfile

26 lines
543 B
Text
Raw Normal View History

FROM python:3.12-alpine3.19
2024-07-20 10:42:31 +02:00
# Install dependencies
2024-07-12 00:49:34 +02:00
RUN apk add --no-cache \
2024-07-20 10:42:31 +02:00
xvfb \
2024-07-12 00:49:34 +02:00
nss \
freetype \
freetype-dev \
harfbuzz \
ca-certificates \
2024-07-20 10:42:31 +02:00
ttf-freefont \
chromium \
chromium-chromedriver
2024-07-12 00:49:34 +02:00
WORKDIR /usr/app/src
COPY index.py requirements.txt ./
2024-07-20 10:42:31 +02:00
RUN pip install --no-cache-dir -r requirements.txt
COPY docker/scripts/startup.sh ./
RUN sed -i 's/await self.sleep(0.5)/await self.sleep(2)/' /usr/local/lib/python3.12/site-packages/nodriver/core/browser.py
2024-07-12 00:49:34 +02:00
# Run
2024-11-17 15:08:19 +01:00
CMD [ "./startup.sh"]