From 98db6a232d13c51763322737cb2d60831201da34 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Wed, 18 Mar 2015 18:56:46 -0700 Subject: [PATCH] Have selinux allow docker<=>nginx communication --- .../roles/test_docker/tasks/docker-tests.yml | 5 ++++- .../roles/test_docker/tasks/registry-tests.yml | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/test/integration/roles/test_docker/tasks/docker-tests.yml b/test/integration/roles/test_docker/tasks/docker-tests.yml index 383b8eb3f65..33ffe6c70ca 100644 --- a/test/integration/roles/test_docker/tasks/docker-tests.yml +++ b/test/integration/roles/test_docker/tasks/docker-tests.yml @@ -72,5 +72,8 @@ that: - "'hello world' in docker_output.stdout_lines" -- name: Remove the busybox image from the local docker +- name: Remove containers + shell: "docker rm $(docker ps -aq)" + +- name: Remove all images from the local docker shell: "docker rmi -f $(docker images -q)" diff --git a/test/integration/roles/test_docker/tasks/registry-tests.yml b/test/integration/roles/test_docker/tasks/registry-tests.yml index 03d2fa0db73..57b4d252774 100644 --- a/test/integration/roles/test_docker/tasks/registry-tests.yml +++ b/test/integration/roles/test_docker/tasks/registry-tests.yml @@ -90,6 +90,20 @@ that: - "{{ docker_output.stdout_lines| length }} <= 1" +# +# Private registry secured with an SSL proxy +# + +- name: Set selinux to allow docker to connect to nginx + seboolean: + name: docker_connect_any + state: yes + +- name: Set selinux to allow nginx to connect to docker + seboolean: + name: httpd_can_network_connect + state: yes + - name: Setup nginx with a user/password copy: src: docker-registry.htpasswd