1
1
mirror of https://github.com/derogab/ITAvsCOVIDbot synced 2024-12-26 15:32:34 +01:00
ITAvsCOVIDbot/Dockerfile
Gabriele De Rosa 39fc0be135 Add wkhtmltopdf requirements on Alpine
- Install ttf-liberation 
- Install qt5-qtwebkit
2021-11-26 15:04:17 +01:00

44 lines
1.1 KiB
Docker

FROM alpine:3.14
# Set working space
WORKDIR /usr/src/app
# Install dependencies
RUN apk update --no-cache \
# Install packages
&& apk add --no-cache \
tzdata \
python3 py3-pip py3-numpy py3-pandas py3-matplotlib \
ttf-liberation qt5-qtwebkit wkhtmltopdf \
# Set UTC as timezone
&& ln -snf /usr/share/zoneinfo/Europe/Rome /etc/localtime \
# Remove tmp files
&& rm -rf /tmp/* /var/tmp/* \
# Upgrade PIP
&& python3 -m pip install --no-cache-dir --upgrade pip
# Copy PIP extra index URLs
COPY pip.conf .
# Copy requirements
COPY requirements.txt .
# Install requirements
RUN apk update --no-cache \
# Install tmp packages
&& apk add --no-cache --virtual build-deps gcc python3-dev musl-dev build-base freetype-dev libpng-dev openblas-dev \
# Add PIP extra index URLs
&& mv pip.conf /etc/pip.conf \
# Install PIP packages
&& python3 -m pip install --no-cache-dir -r requirements.txt \
# Delete tmp packages
&& apk del build-deps
# Copy app
COPY . .
# Create folder
RUN mkdir out
# Start the bot
CMD python3 -u bot.py