ITAvsCOVIDbot/Dockerfile

41 lines
1.0 KiB
Docker
Raw Normal View History

2021-10-31 02:37:45 +01:00
FROM alpine:latest
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-10-26 14:22:26 +02:00
RUN apk update \
2021-10-17 15:28:01 +02:00
# Set UTC as timezone
&& ln -snf /usr/share/zoneinfo/Europe/Rome /etc/localtime \
2021-10-31 02:37:45 +01:00
# Install packages
2021-10-26 15:04:38 +02:00
&& apk add \
2021-10-31 02:37:45 +01:00
build-base freetype-dev libpng-dev openblas-dev \
2021-10-31 02:40:06 +01:00
python3 py3-pip py3-numpy py3-pandas py3-matplotlib \
2021-10-26 15:04:38 +02:00
wkhtmltopdf \
2021-10-17 15:28:01 +02:00
# Remove tmp files
2021-10-26 14:22:26 +02:00
&& rm -rf /tmp/* /var/tmp/* \
2021-10-17 15:28:01 +02:00
# 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
2021-10-31 02:37:45 +01:00
# Copy requirements
2021-01-06 17:57:35 +01:00
COPY requirements.txt .
2021-10-31 02:37:45 +01:00
# Install requirements
RUN apk update \
# Install tmp packages
&& apk add --virtual build-deps gcc python3-dev musl-dev \
# 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