2025-01-26 12:44:16 -07:00
|
|
|
FROM browserless/chrome:1.61.1-chrome-stable
|
2025-06-29 11:50:44 -06:00
|
|
|
WORKDIR /app
|
|
|
|
|
ENV PYTHONUNBUFFERED=1
|
2021-11-01 16:42:52 -06:00
|
|
|
|
2025-06-29 11:50:44 -06:00
|
|
|
# Switch to root for package installation
|
2021-11-01 16:42:52 -06:00
|
|
|
USER root
|
|
|
|
|
|
2025-06-29 11:50:44 -06:00
|
|
|
# Install Python and dependencies
|
|
|
|
|
RUN apt-get update && \
|
|
|
|
|
apt-get install -y python3 python3-dev python3-venv curl && \
|
|
|
|
|
ln -sf python3 /usr/bin/python && \
|
|
|
|
|
apt-get clean && \
|
|
|
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
|
|
# Set up virtual environment
|
2025-01-26 12:44:16 -07:00
|
|
|
RUN python3 -m venv /app/venv
|
|
|
|
|
|
2025-06-29 11:50:44 -06:00
|
|
|
# Install Node.js dependencies
|
2025-01-26 12:44:16 -07:00
|
|
|
RUN npm install -g single-file-cli@2.0.73 readability-extractor@0.0.6
|
2021-11-01 16:42:52 -06:00
|
|
|
|
2025-06-29 11:50:44 -06:00
|
|
|
# Install Python dependencies
|
2021-11-10 10:11:02 -07:00
|
|
|
COPY docker/archive/requirements.txt /app/requirements.txt
|
2025-06-29 11:50:44 -06:00
|
|
|
RUN /app/venv/bin/pip3 install --no-cache-dir -r /app/requirements.txt
|
|
|
|
|
|
|
|
|
|
# Copy application files
|
|
|
|
|
COPY docker/archive/main.py /app/
|
2021-11-01 16:42:52 -06:00
|
|
|
|
2025-06-29 11:50:44 -06:00
|
|
|
# Launch Archive app in virtual environment
|
|
|
|
|
ENTRYPOINT ["/app/venv/bin/python3", "/app/main.py"]
|