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

27 lines
592 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-11-17 15:32:29 +01:00
WORKDIR /app
COPY potoken-generator.py requirements.txt ./
COPY potoken_generator/ ./potoken_generator/
2024-07-12 00:49:34 +02:00
2024-07-20 10:42:31 +02:00
RUN pip install --no-cache-dir -r requirements.txt
COPY docker/scripts/startup.sh ./
2024-11-17 16:08:04 +01:00
RUN sed -i 's/await self.sleep(0.5)/await self.sleep(2)/' /usr/local/lib/python3.13/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"]