WIP docker changes for cli and auto_archiver

This commit is contained in:
msramalho
2022-11-10 17:46:40 +00:00
parent 390b84eb22
commit 04263094ad
17 changed files with 156 additions and 86 deletions

View File

@@ -18,16 +18,17 @@ RUN pip install --upgrade pip && \
# TODO: currently disabled see https://github.com/bellingcat/auto-archiver/issues/66
# 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 Pipfile Pipfile.lock ./
RUN pipenv install --python=3.10 --system --deploy
ENV IS_DOCKER=1
COPY ./src/ .
# CMD ["pipenv", "run", "python", "auto_archive.py"]
ENTRYPOINT ["python", "auto_archive.py"]
# 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 ["python"]
# ENTRYPOINT ["docker-entrypoint.sh"]
# should be executed with 2 volumes
# 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