2022-11-08 13:59:35 +00:00
|
|
|
# stage 1 - all dependencies
|
2023-05-07 11:06:47 +00:00
|
|
|
FROM webrecorder/browsertrix-crawler:latest
|
2022-10-31 17:10:55 +00:00
|
|
|
|
2023-05-09 10:12:02 +00:00
|
|
|
ENV RUNNING_IN_DOCKER=1
|
2023-05-09 15:38:17 +00:00
|
|
|
# ENV NO_PROXY=1
|
2023-05-09 10:12:02 +00:00
|
|
|
|
2022-11-02 16:51:32 +00:00
|
|
|
WORKDIR /app
|
2022-10-31 17:10:55 +00:00
|
|
|
|
|
|
|
# TODO: use custom ffmpeg builds instead of apt-get install
|
|
|
|
RUN pip install --upgrade pip && \
|
|
|
|
pip install pipenv && \
|
|
|
|
apt-get update && \
|
2023-05-07 11:06:47 +00:00
|
|
|
apt-get install -y gcc ffmpeg fonts-noto firefox && \
|
2022-11-08 13:59:35 +00:00
|
|
|
wget https://github.com/mozilla/geckodriver/releases/download/v0.32.0/geckodriver-v0.32.0-linux64.tar.gz && \
|
2022-11-02 16:51:32 +00:00
|
|
|
tar -xvzf geckodriver* -C /usr/local/bin && \
|
|
|
|
chmod +x /usr/local/bin/geckodriver && \
|
2022-11-08 13:59:35 +00:00
|
|
|
rm geckodriver-v*
|
|
|
|
|
|
|
|
|
2023-05-09 15:38:17 +00:00
|
|
|
# # install docker for WACZ
|
|
|
|
# # TODO: currently disabled see https://github.com/bellingcat/auto-archiver/issues/66
|
|
|
|
# # RUN curl -fsSL https://get.docker.com | sh
|
2022-11-08 13:59:35 +00:00
|
|
|
|
2023-05-09 15:38:17 +00:00
|
|
|
# # TODO: avoid copying unnecessary files, including .git
|
|
|
|
COPY Pipfile* ./
|
|
|
|
RUN pipenv install --skip-lock
|
|
|
|
# # ENV IS_DOCKER=1
|
|
|
|
# # doing this at the end helps during development, builds are quick
|
2022-11-08 15:55:33 +00:00
|
|
|
COPY ./src/ .
|
2022-10-31 17:10:55 +00:00
|
|
|
|
2023-05-09 15:38:17 +00:00
|
|
|
# # TODO: figure out how to make volumes not be root, does it depend on host or dockerfile?
|
|
|
|
# # RUN useradd --system --groups sudo --shell /bin/bash archiver && chown -R archiver:sudo .
|
|
|
|
# # USER archiver
|
|
|
|
# # ENTRYPOINT ["python3"]
|
|
|
|
# # ENTRYPOINT ["docker-entrypoint.sh"]
|
2022-11-02 16:51:32 +00:00
|
|
|
|
2023-05-09 15:38:17 +00:00
|
|
|
ADD docker-entrypoint.sh /docker-entrypoint.sh
|
|
|
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
|
|
|
|
|
|
|
CMD ["python3"]
|
|
|
|
|
|
|
|
# # should be executed with 2 volumes (3 if local_storage)
|
|
|
|
# # docker run -v /var/run/docker.sock:/var/run/docker.sock -v $PWD/secrets:/app/secrets -v $PWD/local_archive:/app/local_archive aa --help
|