mirror of
https://github.com/bellingcat/auto-archiver.git
synced 2026-06-07 19:08:30 +03:00
Working, but some cleanup still necessary
This commit is contained in:
36
Dockerfile
36
Dockerfile
@@ -2,6 +2,7 @@
|
||||
FROM webrecorder/browsertrix-crawler:latest
|
||||
|
||||
ENV RUNNING_IN_DOCKER=1
|
||||
# ENV NO_PROXY=1
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
@@ -16,22 +17,27 @@ RUN pip install --upgrade pip && \
|
||||
rm geckodriver-v*
|
||||
|
||||
|
||||
# install docker for WACZ
|
||||
# TODO: currently disabled see https://github.com/bellingcat/auto-archiver/issues/66
|
||||
# RUN curl -fsSL https://get.docker.com | sh
|
||||
# # install docker for WACZ
|
||||
# # TODO: currently disabled see https://github.com/bellingcat/auto-archiver/issues/66
|
||||
# # RUN curl -fsSL https://get.docker.com | sh
|
||||
|
||||
# TODO: avoid copying unnecessary files, including .git
|
||||
COPY Pipfile Pipfile.lock ./
|
||||
RUN pipenv install --python=3.10 --system --deploy
|
||||
# ENV IS_DOCKER=1
|
||||
# doing this at the end helps during development, builds are quick
|
||||
# # 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
|
||||
COPY ./src/ .
|
||||
|
||||
# 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"]
|
||||
# # 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"]
|
||||
|
||||
# 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
|
||||
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
|
||||
Reference in New Issue
Block a user