Merge pull request #354 from bfirsh/use-official-repository-for-dockerfile

Add Makefile for running tests in Docker
This commit is contained in:
Joffrey F 2014-10-29 17:59:35 +01:00
commit 0d806d81b4
2 changed files with 19 additions and 4 deletions

View File

@ -1,6 +1,6 @@
FROM ubuntu:12.10
FROM python:2.7
MAINTAINER Joffrey F <joffrey@dotcloud.com>
RUN apt-get update
RUN yes | apt-get install python-pip
ADD . /home/docker-py
RUN cd /home/docker-py && pip install .
WORKDIR /home/docker-py
RUN pip install -r test-requirements.txt
RUN pip install .

15
Makefile Normal file
View File

@ -0,0 +1,15 @@
.PHONY: all build test integration-test unit-test
all: test
build:
docker build -t docker-py .
test: unit-test integration-test
unit-test: build
docker run docker-py python tests/test.py
integration-test: build
docker run -v /var/run/docker.sock:/var/run/docker.sock docker-py python tests/integration_test.py