diff --git a/Dockerfile b/Dockerfile index 1d67ff945..49668ba96 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,6 @@ # Note: This image is also built in CircleCI, so limit references to internal repositories. -FROM python:3.7 +### Build stage +FROM python:3.7 AS builder # Create app directory WORKDIR /usr/src/app @@ -12,4 +13,9 @@ COPY . /usr/src/app RUN pip install tox==3.15.0 RUN pip install -r requirements.txt +### Runtime stage +FROM python:3.7 +COPY --from=builder /usr/src/app /usr/src/app +WORKDIR /usr/src/app + CMD ["make", "test"]