Skip to content

Commit

Permalink
docker
Browse files Browse the repository at this point in the history
  • Loading branch information
milinsoft committed May 12, 2024
1 parent ff745e6 commit 306f7f8
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ RUN set -ex \
&& apk add --update --no-cache git python3 py3-pip \
&& git clone $GIT_REPO_URL $PROJECT_FOLDER -b $branch --depth=1 \
&& python3 -m venv venv \
&& chmod +x ./venv/bin/activate \
&& ./venv/bin/pip install -r $PROJECT_FOLDER/requirements.txt \
&& ln -sf /venv/bin/python /usr/bin/python \
&& source venv/bin/activate \
&& pip install -r $PROJECT_FOLDER/requirements.txt \
&& apk del git \
&& rm -rf /var/cache/apk/* /root/.cache $PROJECT_FOLDER/.git

# FIXME: Fix command in the final version
CMD ["python", "-m", "unittest", "discover", "bank_app"]
# Activate the virtual environment and run unit tests
CMD ["sh", "-c", "source /app/venv/bin/activate && python -m unittest discover bank_app"]

0 comments on commit 306f7f8

Please sign in to comment.