Add PiWheels support
This commit is contained in:
parent
64c1885fcf
commit
a9fbe72fa4
23
Dockerfile
23
Dockerfile
|
@ -3,11 +3,24 @@ FROM python:3
|
||||||
# Set working space
|
# Set working space
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
# Install requirements
|
# Install dependencies
|
||||||
RUN ln -snf /usr/share/zoneinfo/Europe/Rome /etc/localtime && \
|
RUN apt-get update \
|
||||||
apt-get update && apt-get install -y wkhtmltopdf
|
# 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 .
|
COPY requirements.txt .
|
||||||
RUN pip install -r requirements.txt
|
RUN python3 -m pip install -r requirements.txt
|
||||||
|
|
||||||
# Copy app
|
# Copy app
|
||||||
COPY . .
|
COPY . .
|
||||||
|
@ -16,4 +29,4 @@ COPY . .
|
||||||
RUN mkdir out
|
RUN mkdir out
|
||||||
|
|
||||||
# Start the bot
|
# Start the bot
|
||||||
CMD python -u bot.py
|
CMD python3 -u bot.py
|
Loading…
Reference in New Issue