-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
27 lines (20 loc) · 848 Bytes
/
Dockerfile
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
FROM python:3-alpine as test
# This Dockerfile abuses the multistage build to run a test suite before
# building the actual (lean) docker image.
# install requirements
RUN apk add --no-cache --virtual .pynacl_deps build-base python3-dev libffi-dev vsftpd
ADD requirements*.txt setup.cfg ./
RUN pip install --no-cache-dir -r requirements.txt -r requirements_dev.txt
# install assets
ADD assets/ /opt/resource/
ADD test/ /opt/resource-tests/
RUN pylama /opt/resource /opt/resource-tests/
RUN RESOURCE_DEBUG=1 py.test -l --tb=short -vv -r fE /opt/resource-tests
# 'clean' all test requirements from the image to have a nice small download
FROM python:3-alpine
# install requirements
ADD requirements*.txt setup.cfg ./
RUN pip install --no-cache-dir -r requirements.txt
# install assets
ADD assets/ /opt/resource/
ADD test/ /opt/resource-tests/