From: Daniel Brooks Date: Wed, 9 Aug 2017 00:39:10 +0000 (-0700) Subject: add the :Z option to all mounted volumes so that discourse works when selinux is... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=2b0b0938c475b8886ee14f66e8b16f403ca8213a;p=discourse_docker.git add the :Z option to all mounted volumes so that discourse works when selinux is enabled --- diff --git a/launcher b/launcher index 0a90baa..687557b 100755 --- a/launcher +++ b/launcher @@ -252,8 +252,12 @@ RUBY set_volumes() { + local volopts= + if selinuxenabled; then + volopts=":Z" + fi volumes=`cat $config_file | $docker_path run $user_args --rm -i -a stdout -a stdin $image ruby -e \ - "require 'yaml'; puts YAML.load(STDIN.readlines.join)['volumes'].map{|v| '-v ' << v['volume']['host'] << ':' << v['volume']['guest'] << ' '}.join"` + "require 'yaml'; puts YAML.load(STDIN.readlines.join)['volumes'].map{|v| '-v ' << v['volume']['host'] << ':' << v['volume']['guest'] << '${volopts} '}.join"` } set_links() {