diff --git a/docker/Dockerfile b/docker/Dockerfile index 8917d6ce7e..89e2e3da54 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -3,7 +3,7 @@ FROM python:${python_version}-slim-bullseye AS build WORKDIR /src -ADD . . +COPY . . RUN pip install --no-cache-dir poetry RUN poetry build diff --git a/docker/Dockerfile.bdd b/docker/Dockerfile.bdd index d2e6c2098a..afbd779fa4 100644 --- a/docker/Dockerfile.bdd +++ b/docker/Dockerfile.bdd @@ -4,6 +4,6 @@ FROM faber-alice-demo RUN pip3 install --no-cache-dir -r demo/requirements.behave.txt WORKDIR ./demo -ADD demo/multi_ledger_config_bdd.yml ./demo/multi_ledger_config.yml +COPY demo/multi_ledger_config_bdd.yml ./demo/multi_ledger_config.yml RUN chmod a+w . ENTRYPOINT ["behave"] diff --git a/docker/Dockerfile.demo b/docker/Dockerfile.demo index db63f2cb28..766dde0a64 100644 --- a/docker/Dockerfile.demo +++ b/docker/Dockerfile.demo @@ -9,25 +9,25 @@ RUN mkdir -p bin && curl -L -o bin/jq \ https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 && \ chmod ug+x bin/jq -# Add and install Aries Agent code +# Copy and install Aries Agent code RUN pip install --no-cache-dir poetry -ADD README.md pyproject.toml poetry.lock ./ +COPY README.md pyproject.toml poetry.lock ./ ARG all_extras=0 RUN if ! [ -z ${all_extras} ]; then poetry install --no-root --no-directory --all-extras; else poetry install --no-root --no-directory -E "didcommv2"; fi -ADD acapy_agent ./acapy_agent -ADD scripts ./scripts +COPY acapy_agent ./acapy_agent +COPY scripts ./scripts RUN pip3 install --no-cache-dir -e . RUN mkdir demo && chown -R aries:aries demo && chmod -R ug+rw demo -# Add and install demo code -ADD demo/requirements.txt ./demo/requirements.txt +# Copy and install demo code +COPY demo/requirements.txt ./demo/requirements.txt RUN pip3 install --no-cache-dir -r demo/requirements.txt -ADD demo ./demo +COPY demo ./demo ENTRYPOINT ["bash", "-c", "demo/ngrok-wait.sh \"$@\"", "--"] diff --git a/docker/Dockerfile.run b/docker/Dockerfile.run index 90bfb05ad9..706588d0b5 100644 --- a/docker/Dockerfile.run +++ b/docker/Dockerfile.run @@ -15,12 +15,12 @@ RUN apt-get update && apt-get install -y curl && apt-get clean RUN pip install --no-cache-dir poetry RUN mkdir -p acapy_agent && touch acapy_agent/__init__.py -ADD pyproject.toml poetry.lock README.md ./ +COPY pyproject.toml poetry.lock README.md ./ RUN mkdir -p log && chmod -R ug+rw log ARG all_extras=0 RUN if ! [ -z ${all_extras} ]; then poetry install --all-extras; else poetry install -E "didcommv2"; fi -ADD . . +COPY . . ENTRYPOINT ["/bin/bash", "-c", "poetry run aca-py \"$@\"", "--"] diff --git a/docker/Dockerfile.test b/docker/Dockerfile.test index 5351bccdcd..fb4e9e98f1 100644 --- a/docker/Dockerfile.test +++ b/docker/Dockerfile.test @@ -11,12 +11,12 @@ WORKDIR /usr/src/app RUN pip install --no-cache-dir poetry -ADD ./README.md pyproject.toml ./poetry.lock ./ +COPY ./README.md pyproject.toml ./poetry.lock ./ RUN mkdir acapy_agent && touch acapy_agent/__init__.py ARG all_extras=0 RUN if ! [ -z ${all_extras} ]; then poetry install --no-directory --all-extras --with=dev; else poetry install --no-directory -E "didcommv2" --with=dev; fi -ADD . . +COPY . . ENTRYPOINT ["/bin/bash", "-c", "poetry run pytest \"$@\"", "--"]