From f9c58a0b9132c60350cf00a6cbbcf83e4f1b6016 Mon Sep 17 00:00:00 2001 From: Michael Irwin Date: Mon, 18 Sep 2023 11:06:10 -0400 Subject: [PATCH] Update vote service to python:3.11 Signed-off-by: Michael Irwin --- vote/Dockerfile | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/vote/Dockerfile b/vote/Dockerfile index 9b04d66..75703ad 100644 --- a/vote/Dockerfile +++ b/vote/Dockerfile @@ -1,20 +1,19 @@ # Using official python runtime base image -FROM python:3.9-slim +FROM python:3.11-slim # add curl for healthcheck -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - curl \ - && rm -rf /var/lib/apt/lists/* +RUN apt-get update && \ + apt-get install -y --no-install-recommends curl && \ + rm -rf /var/lib/apt/lists/* # Set the application directory -WORKDIR /app +WORKDIR /usr/local/app # Install our requirements.txt -COPY requirements.txt /app/requirements.txt -RUN pip install -r requirements.txt +COPY requirements.txt ./requirements.txt +RUN pip install --no-cache-dir -r requirements.txt -# Copy our code from the current folder to /app inside the container +# Copy our code from the current folder to the working directory inside the container COPY . . # Make port 80 available for links and/or publish