Use alpine:latest
This commit is contained in:
parent
2cdaf9199e
commit
c08169e987
20
Dockerfile
20
Dockerfile
|
@ -1,4 +1,4 @@
|
|||
FROM python:3-alpine
|
||||
FROM alpine:latest
|
||||
|
||||
# Set working space
|
||||
WORKDIR /usr/src/app
|
||||
|
@ -7,10 +7,10 @@ WORKDIR /usr/src/app
|
|||
RUN apk update \
|
||||
# Set UTC as timezone
|
||||
&& ln -snf /usr/share/zoneinfo/Europe/Rome /etc/localtime \
|
||||
# Install APT packages
|
||||
# Install packages
|
||||
&& apk add \
|
||||
gcc cmake build-base freetype-dev libpng-dev openblas-dev \
|
||||
py3-numpy py3-pandas py3-matplotlib \
|
||||
build-base freetype-dev libpng-dev openblas-dev \
|
||||
python3 py3-numpy py3-pandas py3-matplotlib \
|
||||
wkhtmltopdf \
|
||||
# Remove tmp files
|
||||
&& rm -rf /tmp/* /var/tmp/* \
|
||||
|
@ -19,9 +19,17 @@ RUN apk update \
|
|||
# Upgrade PIP
|
||||
&& python3 -m pip install --no-cache-dir --upgrade pip
|
||||
|
||||
# Copy and install requirements
|
||||
# Copy requirements
|
||||
COPY requirements.txt .
|
||||
RUN python3 -m pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# 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
|
||||
|
||||
# Copy app
|
||||
COPY . .
|
||||
|
|
Loading…
Reference in New Issue