ITAvsCOVIDbot/Dockerfile

44 lines
1.1 KiB
Docker
Raw Permalink Normal View History

2021-11-26 12:20:13 +01:00
FROM alpine:3.14
2021-01-06 17:57:35 +01:00
# Set working space
WORKDIR /usr/src/app
2021-10-17 15:28:01 +02:00
# Install dependencies
2021-11-26 12:16:43 +01:00
RUN apk update --no-cache \
# Install packages
2021-11-26 12:16:43 +01:00
&& apk add --no-cache \
tzdata \
python3 py3-pip py3-numpy py3-pandas py3-matplotlib \
ttf-liberation qt5-qtwebkit wkhtmltopdf \
2021-10-31 02:48:30 +01:00
# Set UTC as timezone
&& ln -snf /usr/share/zoneinfo/Europe/Rome /etc/localtime \
2021-10-17 15:28:01 +02:00
# Remove tmp files
&& rm -rf /tmp/* /var/tmp/* \
2021-10-17 15:28:01 +02:00
# Upgrade PIP
&& python3 -m pip install --no-cache-dir --upgrade pip
2021-11-26 12:44:25 +01:00
# Copy PIP extra index URLs
2021-11-26 12:45:25 +01:00
COPY pip.conf .
2021-11-26 12:44:25 +01:00
# Copy requirements
2021-01-06 17:57:35 +01:00
COPY requirements.txt .
# Install requirements
2021-11-26 12:16:43 +01:00
RUN apk update --no-cache \
# Install tmp packages
2021-11-26 12:54:06 +01:00
&& apk add --no-cache --virtual build-deps gcc python3-dev musl-dev build-base freetype-dev libpng-dev openblas-dev \
2021-11-26 12:44:25 +01:00
# 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
2021-01-06 17:57:35 +01:00
# Copy app
COPY . .
# Create folder
RUN mkdir out
# Start the bot
2021-10-17 15:28:01 +02:00
CMD python3 -u bot.py