mirror of https://github.com/docker/docker-py.git
Update integration-dind task
This commit is contained in:
parent
abaf346b49
commit
fa3082b6cd
10
Makefile
10
Makefile
|
@ -4,6 +4,9 @@ HOST_TMPDIR=test -n "$(TMPDIR)" && echo $(TMPDIR) || echo /tmp
|
|||
|
||||
all: test
|
||||
|
||||
clean:
|
||||
docker rm -vf dpy-dind
|
||||
|
||||
build:
|
||||
docker build -t docker-py .
|
||||
|
||||
|
@ -24,6 +27,9 @@ integration-test: build
|
|||
integration-test-py3: build-py3
|
||||
docker run -v `$(HOST_TMPDIR)`:/tmp -v /var/run/docker.sock:/var/run/docker.sock docker-py3 py.test -rxs tests/integration_test.py
|
||||
|
||||
integration-ci:
|
||||
integration-dind: build build-py3
|
||||
docker build -t dpy-tests -f ./tests/Dockerfile .
|
||||
docker run --privileged -t dpy-tests
|
||||
docker run -d --name dpy-dind -v /tmp --privileged dockerswarm/dind:1.8.1 docker -d -H tcp://0.0.0.0:2375
|
||||
docker run --volumes-from dpy-dind --env="DOCKER_HOST=tcp://docker:2375" --link=dpy-dind:docker docker-py py.test -rxs tests/integration_test.py
|
||||
docker run --volumes-from dpy-dind --env="DOCKER_HOST=tcp://docker:2375" --link=dpy-dind:docker docker-py3 py.test -rxs tests/integration_test.py
|
||||
docker rm -vf dpy-dind
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
FROM dockerswarm/dind:1.8.1
|
||||
MAINTAINER Joffrey F <joffrey@docker.com>
|
||||
|
||||
RUN mkdir /home/docker-py
|
||||
WORKDIR /home/docker-py
|
||||
|
||||
RUN apt-get update && apt-get install -y python python-setuptools && easy_install pip
|
||||
|
||||
ADD requirements.txt /home/docker-py/requirements.txt
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
ADD test-requirements.txt /home/docker-py/test-requirements.txt
|
||||
RUN pip install -r test-requirements.txt
|
||||
|
||||
ADD . /home/docker-py
|
||||
RUN pip install -U .
|
||||
|
||||
CMD ["bash", "-c", "docker daemon 2>/dev/null & py.test -rxs tests/integration_test.py"]
|
Loading…
Reference in New Issue