Compare commits
3 Commits
a9fbe72fa4
...
b73cde8cd5
Author | SHA1 | Date |
---|---|---|
Gabriele De Rosa | b73cde8cd5 | |
Gabriele De Rosa | b468bf8572 | |
Gabriele De Rosa | a336ea0ffa |
15
Dockerfile
15
Dockerfile
|
@ -1,18 +1,19 @@
|
||||||
FROM python:3
|
FROM python:3-alpine
|
||||||
|
|
||||||
# Set working space
|
# Set working space
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN apt-get update \
|
RUN apk update \
|
||||||
# Prevent endless waiting
|
|
||||||
&& DEBIAN_FRONTEND=noninteractive \
|
|
||||||
# Set UTC as timezone
|
# Set UTC as timezone
|
||||||
&& ln -snf /usr/share/zoneinfo/Europe/Rome /etc/localtime \
|
&& ln -snf /usr/share/zoneinfo/Europe/Rome /etc/localtime \
|
||||||
# Install APT packages
|
# Install APT packages
|
||||||
&& apt-get install -y --fix-missing wkhtmltopdf \
|
&& apk add \
|
||||||
|
gcc build-base freetype-dev libpng-dev openblas-dev \
|
||||||
|
py3-numpy py3-pandas py3-pillow py3-matplotlib \
|
||||||
|
wkhtmltopdf \
|
||||||
# Remove tmp files
|
# Remove tmp files
|
||||||
&& apt-get clean && rm -rf /tmp/* /var/tmp/* \
|
&& rm -rf /tmp/* /var/tmp/* \
|
||||||
# Add PiWheels support
|
# Add PiWheels support
|
||||||
&& echo "[global]\nextra-index-url=https://www.piwheels.org/simple" >> /etc/pip.conf \
|
&& echo "[global]\nextra-index-url=https://www.piwheels.org/simple" >> /etc/pip.conf \
|
||||||
# Upgrade PIP
|
# Upgrade PIP
|
||||||
|
@ -20,7 +21,7 @@ RUN apt-get update \
|
||||||
|
|
||||||
# Copy and install requirements
|
# Copy and install requirements
|
||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
RUN python3 -m pip install -r requirements.txt
|
RUN python3 -m pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
# Copy app
|
# Copy app
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
Loading…
Reference in New Issue