mirror of https://github.com/docker/docker-py.git
Merge pull request #354 from bfirsh/use-official-repository-for-dockerfile
Add Makefile for running tests in Docker
This commit is contained in:
commit
0d806d81b4
|
|
@ -1,6 +1,6 @@
|
||||||
FROM ubuntu:12.10
|
FROM python:2.7
|
||||||
MAINTAINER Joffrey F <joffrey@dotcloud.com>
|
MAINTAINER Joffrey F <joffrey@dotcloud.com>
|
||||||
RUN apt-get update
|
|
||||||
RUN yes | apt-get install python-pip
|
|
||||||
ADD . /home/docker-py
|
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 .
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
||||||
Loading…
Reference in New Issue