diff --git a/Dockerfile b/Dockerfile index 9b1ae01..7587a3b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,16 +14,16 @@ RUN apk add --update --no-cache python3 py3-pip # Specify the working directory WORKDIR /usr/src/app -# Copy the requirements.txt to install them before running -#COPY requirements.txt /usr/src/app/ +#COPY the project to /usr/src/app/ COPY . /usr/src/app -RUN python3 -m venv . && \ - echo '~~~~~~~~~~~~~~' && \ - pwd && \ - ls -lhaR /usr/src/ && \ - . ./bin/activate && \ - /usr/src/bin/pip3 install -r requirements.txt +# Install python dependencies +RUN python3 -m venv . +#ENV PATH="/usr/src/app/bin:$PATH" + +RUN . bin/activate && \ + which python3 && \ + python3 -m pip install -r requirements.txt # Expose default Flask port EXPOSE 5000 diff --git a/entrypoint.sh b/entrypoint.sh index ba7e5d6..ea61c62 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,13 +1,9 @@ #!/bin/sh set -e -pwd -echo '---------------------' -ls -. ./bin/activate -echo '------------------ > > > ' -pip -V # TODO: delete it -export PATH="/usr/src/app/bin:$PATH" -echo '-----------> after export' -pip -V + +# Activate venv +. bin/activate + +# Run flask app python3 app.py