kopia lustrzana https://github.com/bellingcat/auto-archiver
Revert Dockerfile changes
rodzic
50f4ebcdc3
commit
cbafbfab3f
15
Dockerfile
15
Dockerfile
|
@ -1,4 +1,4 @@
|
||||||
FROM webrecorder/browsertrix-crawler:1.4.2 AS base
|
FROM webrecorder/browsertrix-crawler:1.0.4 AS base
|
||||||
|
|
||||||
ENV RUNNING_IN_DOCKER=1 \
|
ENV RUNNING_IN_DOCKER=1 \
|
||||||
LANG=C.UTF-8 \
|
LANG=C.UTF-8 \
|
||||||
|
@ -22,30 +22,28 @@ RUN add-apt-repository ppa:mozillateam/ppa && \
|
||||||
|
|
||||||
|
|
||||||
# Poetry and runtime
|
# Poetry and runtime
|
||||||
FROM base AS poetry-env
|
FROM base AS runtime
|
||||||
|
|
||||||
ENV POETRY_NO_INTERACTION=1 \
|
ENV POETRY_NO_INTERACTION=1 \
|
||||||
POETRY_VIRTUALENVS_IN_PROJECT=1 \
|
POETRY_VIRTUALENVS_IN_PROJECT=1 \
|
||||||
POETRY_VIRTUALENVS_CREATE=1
|
POETRY_VIRTUALENVS_CREATE=1
|
||||||
|
|
||||||
|
|
||||||
# Create a virtual environment for poetry and install it
|
RUN pip install --upgrade pip && \
|
||||||
RUN python3 -m venv /poetry-venv && \
|
pip install "poetry>=2.0.0,<3.0.0"
|
||||||
/poetry-venv/bin/python -m pip install --upgrade pip && \
|
|
||||||
/poetry-venv/bin/python -m pip install "poetry>=2.0.0,<3.0.0"
|
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
|
||||||
COPY pyproject.toml poetry.lock README.md ./
|
COPY pyproject.toml poetry.lock README.md ./
|
||||||
# Copy dependency files and install dependencies (excluding the package itself)
|
# Copy dependency files and install dependencies (excluding the package itself)
|
||||||
RUN /poetry-venv/bin/poetry install --only main --no-root --no-cache
|
RUN poetry install --only main --no-root --no-cache
|
||||||
|
|
||||||
|
|
||||||
# Copy code: This is needed for poetry to install the package itself,
|
# Copy code: This is needed for poetry to install the package itself,
|
||||||
# but the environment should be cached from the previous step if toml and lock files haven't changed
|
# but the environment should be cached from the previous step if toml and lock files haven't changed
|
||||||
COPY ./src/ .
|
COPY ./src/ .
|
||||||
RUN /poetry-venv/bin/poetry install --only main --no-cache
|
RUN poetry install --only main --no-cache
|
||||||
|
|
||||||
|
|
||||||
# Update PATH to include virtual environment binaries
|
# Update PATH to include virtual environment binaries
|
||||||
|
@ -57,3 +55,4 @@ ENTRYPOINT ["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