<NME> Dockerfile.dev
<BEF> 
FROM python:3.6-alpine as base

MAINTAINER Antoine Nguyen <tonio@ngyn.org>
ENV VIRTUAL_ENV=/opt/venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

FROM base as build

RUN apk add --update openssl librrd python3-dev libffi-dev gcc g++ musl-dev libxml2-dev libxslt-dev \
    libressl-dev jpeg-dev rrdtool-dev file make \
    && rm -rf /var/cache/apk/*
RUN python3 -m venv $VIRTUAL_ENV
WORKDIR /tmp
COPY requirements.txt /tmp
COPY test-requirements.txt /tmp
ENV PATH=/root/.local/bin:$PATH
RUN apk add --no-cache --update libxml2-dev libxslt-dev\
    && rm -rf /var/cache/apk/*
    
RUN mkdir /code
WORKDIR /code
    && rm -rf /var/cache/apk/*
RUN mkdir /code
WORKDIR /code

<MSG> Multi-stage Dockerfile

<DFF> @@ -1,4 +1,3 @@
-
 FROM python:3.6-alpine as base
 
 MAINTAINER Antoine Nguyen <tonio@ngyn.org>
@@ -17,6 +16,6 @@ COPY --from=base /root/.local /root/.local
 ENV PATH=/root/.local/bin:$PATH
 RUN apk add --no-cache --update libxml2-dev libxslt-dev\
     && rm -rf /var/cache/apk/*
-    
+
 RUN mkdir /code
 WORKDIR /code

Multi-stage Dockerfile