Skip to content

Commit

Permalink
Switch to COPY commands in dockerfiles (#3389)
Browse files Browse the repository at this point in the history
Signed-off-by: jamshale <[email protected]>
Co-authored-by: Stephen Curran <[email protected]>
  • Loading branch information
jamshale and swcurran authored Dec 9, 2024
1 parent f63e294 commit 293f397
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.bdd
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
14 changes: 7 additions & 7 deletions docker/Dockerfile.demo
Original file line number Diff line number Diff line change
Expand Up @@ -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 \"$@\"", "--"]
4 changes: 2 additions & 2 deletions docker/Dockerfile.run
Original file line number Diff line number Diff line change
Expand Up @@ -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 \"$@\"", "--"]
4 changes: 2 additions & 2 deletions docker/Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -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 \"$@\"", "--"]

0 comments on commit 293f397

Please sign in to comment.