kopia lustrzana https://github.com/bellingcat/auto-archiver
Updated Dockerfile (not optimised yet)
rodzic
08e83eb94e
commit
cc490f9c10
28
Dockerfile
28
Dockerfile
|
@ -1,32 +1,36 @@
|
||||||
FROM webrecorder/browsertrix-crawler:1.0.4
|
FROM webrecorder/browsertrix-crawler:1.0.4
|
||||||
|
|
||||||
ENV RUNNING_IN_DOCKER=1
|
ENV RUNNING_IN_DOCKER=1
|
||||||
ENV PATH="/root/.local/bin:$PATH"
|
ENV PATH="/usr/local/bin:/root/.local/bin:$PATH"
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
RUN pip install --upgrade pip && \
|
RUN add-apt-repository ppa:mozillateam/ppa && \
|
||||||
curl -sSL https://install.python-poetry.org | python3 - --version 1.8.3 && \
|
apt-get update && \
|
||||||
poetry --version && \
|
apt-get install -y --no-install-recommends gcc ffmpeg fonts-noto exiftool && \
|
||||||
add-apt-repository ppa:mozillateam/ppa && \
|
apt-get install -y --no-install-recommends firefox-esr && \
|
||||||
apt-get update && \
|
|
||||||
apt-get install -y gcc ffmpeg fonts-noto exiftool && \
|
|
||||||
apt-get install -y --no-install-recommends firefox-esr && \
|
|
||||||
ln -s /usr/bin/firefox-esr /usr/bin/firefox && \
|
ln -s /usr/bin/firefox-esr /usr/bin/firefox && \
|
||||||
wget https://github.com/mozilla/geckodriver/releases/download/v0.33.0/geckodriver-v0.33.0-linux64.tar.gz && \
|
wget https://github.com/mozilla/geckodriver/releases/download/v0.33.0/geckodriver-v0.33.0-linux64.tar.gz && \
|
||||||
tar -xvzf geckodriver* -C /usr/local/bin && \
|
tar -xvzf geckodriver* -C /usr/local/bin && \
|
||||||
chmod +x /usr/local/bin/geckodriver && \
|
chmod +x /usr/local/bin/geckodriver && \
|
||||||
rm geckodriver-v*
|
rm geckodriver-v* && \
|
||||||
|
apt-get clean && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY pyproject.toml poetry.lock ./
|
RUN pip install --upgrade pip && \
|
||||||
|
pip install "poetry>=2.0.0"
|
||||||
|
|
||||||
# Verify Poetry installation and install dependencies
|
COPY pyproject.toml poetry.lock README.md ./
|
||||||
RUN poetry install --no-root
|
|
||||||
|
|
||||||
# doing this at the end helps during development, builds are quick
|
# doing this at the end helps during development, builds are quick
|
||||||
COPY ./src/ .
|
COPY ./src/ .
|
||||||
|
|
||||||
|
# Verify Poetry installation and install dependencies
|
||||||
|
RUN poetry install
|
||||||
|
|
||||||
|
|
||||||
ENTRYPOINT ["poetry", "run", "python3", "-m", "auto_archiver"]
|
ENTRYPOINT ["poetry", "run", "python3", "-m", "auto_archiver"]
|
||||||
|
|
||||||
|
|
||||||
# should be executed with 2 volumes (3 if local_storage is used)
|
# should be executed with 2 volumes (3 if local_storage is used)
|
||||||
# docker run --rm -v $PWD/secrets:/app/secrets -v $PWD/local_archive:/app/local_archive aa pipenv run python3 -m auto_archiver --config secrets/orchestration.yaml
|
# docker run --rm -v $PWD/secrets:/app/secrets -v $PWD/local_archive:/app/local_archive aa pipenv run python3 -m auto_archiver --config secrets/orchestration.yaml
|
||||||
|
|
Ładowanie…
Reference in New Issue