From b59d7d4dca106f91153b3adb4ca5aede4dd115dc Mon Sep 17 00:00:00 2001 From: Yuvraj Singh <64212975+yuvrajsingh001@users.noreply.github.com> Date: Thu, 7 Mar 2024 09:43:10 +0000 Subject: [PATCH] Changes --- Dockerfile | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index 742c5be..db57bdd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,12 @@ -FROM python:3.10 -# Installing dependencies for running a python application -RUN apt-get update && apt-get install -y python3 python3-pip postgresql-client libpq-dev -# Install pipenv -RUN pip3 install poetry -# Setting the working directory -WORKDIR /app -# Install pipenv dependencies -COPY pyproject.toml ./ -RUN poetry install --no-root -# Copying our application into the container -COPY todo todo -# Adding a delay to our application startup -CMD ["bash", "-c", "sleep 10 && poetry run flask --app todo run --host 0.0.0.0 --port 6400"] +FROM python:3.10 +# Install pipenv +RUN pip3 install poetry +# Setting the working directory +WORKDIR /app +# Install pipenv dependencies +COPY pyproject.toml ./ +RUN poetry install --no-root +# Copying our application into the container +COPY todo todo +# Running our application +CMD ["poetry", "run", "flask", "--app", "todo", "run", "--host", "0.0.0.0", "--port", "6400"] \ No newline at end of file