diff --git a/Dockerfile b/Dockerfile index 4c3e3ccba..1d051748e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,27 @@ FROM alpine:latest -# add mono repo and mono +# Add mono repository and install mono RUN apk add --no-cache mono --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing -# install requirements -RUN apk add --no-cache --upgrade ffmpeg mediainfo python3 git py3-pip python3-dev g++ cargo mktorrent rust -RUN pip3 install wheel +# Install system dependencies including Python and tools +RUN apk add --no-cache --upgrade ffmpeg mediainfo python3 git py3-pip python3-dev g++ cargo mktorrent rust -WORKDIR Upload-Assistant +# Set up a virtual environment to isolate our Python dependencies +RUN python3 -m venv /venv +ENV PATH="/venv/bin:$PATH" -# install reqs +# Install wheel and other Python dependencies +RUN pip install wheel + +# Set the working directory in the container +WORKDIR /Upload-Assistant + +# Copy the Python requirements file and install Python dependencies COPY requirements.txt . -RUN pip3 install -r requirements.txt +RUN pip install -r requirements.txt -# copy everything +# Copy the rest of the application's code COPY . . +# Set the entry point for the container ENTRYPOINT ["python3", "/Upload-Assistant/upload.py"] \ No newline at end of file