Skip to content

Commit

Permalink
Allow bind mounted source to be visible when selinux present
Browse files Browse the repository at this point in the history
Adding the :Z onto bind mount of the source so it can be viewed.
(:Z = private and unshared)
  • Loading branch information
traylenator committed Apr 16, 2021
1 parent de24b3b commit 991347b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ task :build do
builder = "choria/packager:el7-go1.16"
end

sh 'docker run --rm -v %s:/var/run/docker.sock -v `pwd`:%s -e SOURCE_DIR=%s -e ARTIFACTS=%s -e SHA1="%s" -e BUILD="%s" -e VERSION="%s" -e PACKAGE=%s %s' % [
sh 'docker run --rm -v %s:/var/run/docker.sock -v `pwd`:%s:Z -e SOURCE_DIR=%s -e ARTIFACTS=%s -e SHA1="%s" -e BUILD="%s" -e VERSION="%s" -e PACKAGE=%s %s' % [
docker_socket,
source,
source,
Expand All @@ -53,7 +53,7 @@ task :build_binaries do

source = "/go/src/github.com/choria-io/aaasvc"

sh 'docker run --rm -v `pwd`:%s -e SOURCE_DIR=%s -e ARTIFACTS=%s -e SHA1="%s" -e BUILD="%s" -e VERSION="%s" -e BINARY_ONLY=1 choria/packager:el7-go1.16' % [
sh 'docker run --rm -v `pwd`:%s:Z -e SOURCE_DIR=%s -e ARTIFACTS=%s -e SHA1="%s" -e BUILD="%s" -e VERSION="%s" -e BINARY_ONLY=1 choria/packager:el7-go1.16' % [
source,
source,
source,
Expand Down

0 comments on commit 991347b

Please sign in to comment.