diff --git a/Dockerfile b/Dockerfile index 29d2198..d1db82b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,11 +3,24 @@ FROM python:3 # Set working space WORKDIR /usr/src/app -# Install requirements -RUN ln -snf /usr/share/zoneinfo/Europe/Rome /etc/localtime && \ - apt-get update && apt-get install -y wkhtmltopdf +# Install dependencies +RUN apt-get update \ + # Prevent endless waiting + && DEBIAN_FRONTEND=noninteractive \ + # Set UTC as timezone + && ln -snf /usr/share/zoneinfo/Europe/Rome /etc/localtime \ + # Install APT packages + && apt-get install -y --fix-missing wkhtmltopdf \ + # Remove tmp files + && apt-get clean && rm -rf /tmp/* /var/tmp/* \ + # Add PiWheels support + && echo "[global]\nextra-index-url=https://www.piwheels.org/simple" >> /etc/pip.conf \ + # Upgrade PIP + && python3 -m pip install --no-cache-dir --upgrade pip + +# Copy and install requirements COPY requirements.txt . -RUN pip install -r requirements.txt +RUN python3 -m pip install -r requirements.txt # Copy app COPY . . @@ -16,4 +29,4 @@ COPY . . RUN mkdir out # Start the bot -CMD python -u bot.py \ No newline at end of file +CMD python3 -u bot.py \ No newline at end of file