diff --git a/Dockerfile b/Dockerfile index ebffd89..0e6a6dc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,18 @@ -FROM ubuntu:latest +FROM alpine:latest # Install dependencies -RUN apt update && apt install -y python3 python3-pip chromium-browser chromium-chromedriver git +RUN apk update && apk add git build-base linux-headers python3 python3-dev py3-pip py3-opencv chromium chromium-chromedriver # Set working directory WORKDIR /app +# Create virtual environment +# RUN python3 -m venv .venv +# ENV PATH="/app/.venv/bin:$PATH" + # Install pip dependencies COPY requirements.txt . -RUN pip3 install -r requirements.txt +RUN pip3 install --break-system-packages -r requirements.txt # Copy source code COPY . . @@ -17,4 +21,4 @@ COPY . . VOLUME ./run # Run the bot -CMD ["python3", "src/main.py"] \ No newline at end of file +CMD ["python3", "src/main.py"] diff --git a/requirements.txt b/requirements.txt index 74ef182..5282812 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,4 +4,3 @@ pytz git+https://github.com/mahrtayyab/tweety.git@e3d330280cb3b2e8f9d2bf2f20425c476f7671a5 tweepy tweet-capture -opencv-python-headless