From 245250d1cb7ec0c150414e1abc8fba39757133dd Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Wed, 17 Oct 2018 15:01:50 -0400 Subject: [PATCH] Fedora docker-compose fixes for selinux By default fedora has SELinux enabled by default, as such we need to pass special flags to our volumes. More infomration can be found at: http://www.projectatomic.io/blog/2015/06/using-volumes-with-docker-can-cause-problems-with-selinux/ Change-Id: Ic1d4dbc6102287952bbd9397b56be560deed23b0 Signed-off-by: Paul Belanger --- doc/source/admin/examples/docker-compose.yaml | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/doc/source/admin/examples/docker-compose.yaml b/doc/source/admin/examples/docker-compose.yaml index 67c429c76a..acafbffec5 100644 --- a/doc/source/admin/examples/docker-compose.yaml +++ b/doc/source/admin/examples/docker-compose.yaml @@ -22,9 +22,9 @@ services: depends_on: - gerrit volumes: - - "sshkey:/var/ssh" - - "nodessh:/var/node" - - "./playbooks/:/var/playbooks/" + - "sshkey:/var/ssh:z" + - "nodessh:/var/node:z" + - "./playbooks/:/var/playbooks/:z" command: "ansible-playbook /var/playbooks/setup.yaml" zk: image: zookeeper @@ -37,9 +37,9 @@ services: command: "sh -c 'ansible-playbook /var/playbooks/scheduler.yaml; zuul-scheduler -d'" image: zuul/zuul-scheduler volumes: - - "./etc_zuul/:/etc/zuul/" - - "./playbooks/:/var/playbooks/" - - "sshkey:/var/ssh" + - "./etc_zuul/:/etc/zuul/:z" + - "./playbooks/:/var/playbooks/:z" + - "sshkey:/var/ssh:z" - /var/lib/zuul web: command: "zuul-web -d" @@ -49,7 +49,7 @@ services: - "9000:9000" image: zuul/zuul-web volumes: - - "./etc_zuul/:/etc/zuul/" + - "./etc_zuul/:/etc/zuul/:z" executor: privileged: true environment: @@ -59,10 +59,10 @@ services: - scheduler image: zuul/zuul-executor volumes: - - "./etc_zuul/:/etc/zuul/" - - "./playbooks/:/var/playbooks/" - - "sshkey:/var/ssh" - - "logs:/srv/static/logs" + - "./etc_zuul/:/etc/zuul/:z" + - "./playbooks/:/var/playbooks/:z" + - "sshkey:/var/ssh:z" + - "logs:/srv/static/logs:z" node: build: dockerfile: node-Dockerfile @@ -72,14 +72,14 @@ services: https_proxy: "${http_proxy}" no_proxy: "${no_proxy}" volumes: - - "nodessh:/root/.ssh" + - "nodessh:/root/.ssh:z" launcher: command: "nodepool-launcher -d" depends_on: - zk image: zuul/nodepool volumes: - - "./etc_nodepool/:/etc/nodepool/" + - "./etc_nodepool/:/etc/nodepool/:z" ports: - "8022:8022" logs: @@ -93,7 +93,7 @@ services: ports: - "8000:80" volumes: - - "logs:/usr/local/apache2/htdocs" + - "logs:/usr/local/apache2/htdocs:z" volumes: sshkey: