From 007b7debcfd1fd7e227f83a4ab15a2dd5a1fbbb0 Mon Sep 17 00:00:00 2001 From: kek20009 Date: Thu, 31 Oct 2024 14:38:54 -0400 Subject: [PATCH] Whoops forgot it lol --- Backend/dockerfile | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Backend/dockerfile b/Backend/dockerfile index 5cf7315..3df30d5 100644 --- a/Backend/dockerfile +++ b/Backend/dockerfile @@ -1,30 +1,30 @@ -# For more information, please refer to https://aka.ms/vscode-docker-python -#just so yk this dockerfile is the template docker gave me lol -# - -FROM ubuntu:latest +# Use Python as the base image FROM python:3.8-slim-buster -#install pip & python3 + +# Install pip and Python dependencies RUN apt-get update && apt-get install -y python3 python3-pip + # Keeps Python from generating .pyc files in the container ENV PYTHONDONTWRITEBYTECODE=1 # Turns off buffering for easier container logging ENV PYTHONUNBUFFERED=1 + +# Set the working directory in the container +WORKDIR /app + + # Install pip requirements COPY requirements.txt . -#just use python3 RUN python3 -m pip install -r requirements.txt -COPY main.py . +# Copy main application file +COPY Backend/main.py . + +# Set the port for the application ENV PORT=5000 EXPOSE 5000 -# Creates a non-root user with an explicit UID and adds permission to access the /app folder -# For more info, please refer to https://aka.ms/vscode-docker-python-configure-containers -#RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /app -#USER appuser - -# During debugging, this entry point will be overridden. For more information, please refer to https://aka.ms/vscode-docker-python-debug -CMD ["python3", "main.py"] \ No newline at end of file +# Command to run the application +CMD ["python3", "main.py"]