Skip to content

Commit

Permalink
small changes on dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
emilyinspace committed Jul 1, 2024
1 parent 4d75440 commit 4e10225
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
16 changes: 8 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 5 additions & 9 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 4e10225

Please sign in to comment.