auto-archiver/Dockerfile

35 wiersze
1.1 KiB
Docker
Czysty Zwykły widok Historia

2023-05-07 11:06:47 +00:00
FROM webrecorder/browsertrix-crawler:latest
2022-10-31 17:10:55 +00:00
ENV RUNNING_IN_DOCKER=1
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 16:45:02 +00:00
# TODO: avoid copying unnecessary files, including .git
COPY Pipfile* ./
2023-05-09 17:19:23 +00:00
RUN pipenv install
2023-05-09 16:45:02 +00:00
# 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 16:45:02 +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
2022-11-02 16:51:32 +00:00
ADD docker-entrypoint.sh /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["python3"]
2023-05-09 16:45:02 +00:00
# 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