From 0a2af85c1f343d26ceba33ecf30900785f400914 Mon Sep 17 00:00:00 2001 From: Choco <94597336+ChocoMeow@users.noreply.github.com> Date: Sat, 3 Feb 2024 19:37:01 +0800 Subject: [PATCH] Update and rename Dockerfile-example to Dockerfile --- Dockerfile-example => Dockerfile | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) rename Dockerfile-example => Dockerfile (57%) diff --git a/Dockerfile-example b/Dockerfile similarity index 57% rename from Dockerfile-example rename to Dockerfile index 92d4933..95f23d6 100644 --- a/Dockerfile-example +++ b/Dockerfile @@ -1,10 +1,8 @@ # Use an official Python runtime as a base image -FROM python:3.11 +FROM python:3.11-slim -RUN apt-get update \ - && apt-get install -y --no-install-recommends git \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* +# Install build dependencies +RUN apt-get update -y && apt-get install -y gcc python3-dev # Set the working directory to /app WORKDIR /app @@ -15,5 +13,5 @@ COPY . /app # Install any needed packages specified in requirements.txt RUN pip install --no-cache-dir -r requirements.txt -# Run app.py when the container launches -CMD ["python", "main.py"] +# Run main.py when the container launches +CMD ["python", "-u", "main.py"]