mirror of
https://github.com/bellingcat/auto-archiver.git
synced 2026-06-08 03:18:28 +03:00
dockerfile improvements
This commit is contained in:
30
Dockerfile
30
Dockerfile
@@ -1,24 +1,34 @@
|
|||||||
|
# stage 1 - all dependencies
|
||||||
From python:3.10
|
From python:3.10
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
|
|
||||||
# TODO: use custom ffmpeg builds instead of apt-get install
|
# TODO: use custom ffmpeg builds instead of apt-get install
|
||||||
RUN pip install --upgrade pip && \
|
RUN pip install --upgrade pip && \
|
||||||
pip install pipenv && \
|
pip install pipenv && \
|
||||||
apt-get update && \
|
apt-get update && \
|
||||||
apt-get install -y gcc ffmpeg fonts-noto firefox-esr
|
apt-get install -y gcc ffmpeg fonts-noto firefox-esr && \
|
||||||
|
wget https://github.com/mozilla/geckodriver/releases/download/v0.32.0/geckodriver-v0.32.0-linux64.tar.gz && \
|
||||||
RUN wget https://github.com/mozilla/geckodriver/releases/download/v0.32.0/geckodriver-v0.32.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*
|
||||||
pipenv install --python=3.10
|
|
||||||
|
|
||||||
|
# install docker for WACZ
|
||||||
|
RUN curl -fsSL https://get.docker.com | sh
|
||||||
|
|
||||||
|
# RUN git clone https://github.com/bellingcat/auto-archiver
|
||||||
|
# TODO: avoid copying unnecessary files, including .git
|
||||||
|
# COPY ./src/ .
|
||||||
|
COPY Pipfile Pipfile.lock ./
|
||||||
|
RUN pipenv install --python=3.10 --system --deploy
|
||||||
|
# TODO: to avoid copying pipfile lock it should be on the .dockerignore
|
||||||
|
ENV IS_DOCKER=1
|
||||||
|
COPY . .
|
||||||
|
|
||||||
# CMD ["pipenv", "run", "python", "auto_archive.py"]
|
# CMD ["pipenv", "run", "python", "auto_archive.py"]
|
||||||
ENTRYPOINT ["pipenv", "run", "python", "auto_archive.py"]
|
ENTRYPOINT ["python", "auto_archive.py"]
|
||||||
|
# ENTRYPOINT ["docker-entrypoint.sh"]
|
||||||
|
|
||||||
# should be executed with 2 volumes
|
# should be executed with 2 volumes
|
||||||
# docker run -v /var/run/docker.sock:/var/run/docker.sock -v $PWD/secrets:/app/ aa --help
|
# 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
|
||||||
Reference in New Issue
Block a user