forked from PabloCastellano/libreborme
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (30 loc) · 757 Bytes
/
Dockerfile
File metadata and controls
32 lines (30 loc) · 757 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
ARG PYTHON_VERSION=3.6
FROM python:${PYTHON_VERSION}-alpine as base
RUN apk update && \
apk add \
--no-cache \
--virtual \
.build-deps \
gcc musl-dev \
postgresql-dev \
libxml2-dev \
libxslt-dev \
libxslt-dev \
postgresql-libs
FROM base as build
WORKDIR /wheels
COPY requirements/* ./
ARG ENV=production
RUN pip install -U pip \
&& pip wheel -r ./${ENV}.txt
FROM base as final
ARG APP_DIR=/app
WORKDIR $APP_DIR
COPY --from=build /wheels /wheels
ARG ENV=production
RUN pip install -U pip \
&& pip install -r /wheels/${ENV}.txt \
-f /wheels \
&& rm -rf /wheels \
&& rm -rf /root/.cache/pip/*
COPY . .