From 2b0b0938c475b8886ee14f66e8b16f403ca8213a Mon Sep 17 00:00:00 2001 From: Daniel Brooks Date: Tue, 8 Aug 2017 17:39:10 -0700 Subject: [PATCH] add the :Z option to all mounted volumes so that discourse works when selinux is enabled --- launcher | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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() { -- 2.25.1