fix use of container
Change-Id: I0ae7c59bda09c60eb5c387e15ab1cca057937aca
diff --git a/src/com/mirantis/mk/Debian.groovy b/src/com/mirantis/mk/Debian.groovy
index 4e3e83a..6c12211 100644
--- a/src/com/mirantis/mk/Debian.groovy
+++ b/src/com/mirantis/mk/Debian.groovy
@@ -32,7 +32,7 @@
def img = dockerLib.getImage("tcpcloud/debian-build-${os}-${dist}", image)
def workspace = common.getWorkspace()
- img.inside("-w ${workspace} --privileged" ) {
+ img.inside("-v ${workspace}:${workspace} -w ${workspace} -u root:root" ) {
sh("""which eatmydata || (apt-get update && apt-get install -y eatmydata) &&
export LD_LIBRARY_PATH=\${LD_LIBRARY_PATH:+"\$LD_LIBRARY_PATH:"}/usr/lib/libeatmydata &&
export LD_PRELOAD=\${LD_PRELOAD:+"\$LD_PRELOAD "}libeatmydata.so &&
@@ -91,7 +91,7 @@
def img = dockerLib.getImage("tcpcloud/debian-build-${os}-${dist}", image)
def workspace = common.getWorkspace()
- img.inside("-w ${workspace} --privileged" ) {
+ img.inside("-v ${workspace}:${workspace} -w ${workspace} -u root:root" ) {
sh("""apt-get update && apt-get install -y build-essential devscripts &&
cd ${dir} && uscan --download-current-version &&
dpkg-buildpackage -S -nc -uc -us""")
@@ -121,7 +121,7 @@
def dist = imageArray[1]
def img = dockerLib.getImage("tcpcloud/debian-build-${os}-${dist}", image)
- img.inside("-w ${workspace} --privileged") {
+ img.inside("-v ${workspace}:${workspace} -w ${workspace} -u root:root") {
withEnv(["DEBIAN_FRONTEND=noninteractive", "DEBFULLNAME='${gitName}'", "DEBEMAIL='${gitEmail}'"]) {
sh("""which eatmydata || (apt-get update && apt-get install -y eatmydata) &&
@@ -173,7 +173,7 @@
def os = imageArray[0]
def dist = imageArray[1]
def img = dockerLib.getImage("tcpcloud/debian-build-${os}-${dist}", image)
- img.inside("-w ${workspace} --privileged") {
+ img.inside("-v ${workspace}:${workspace} -w ${workspace} -u root:root") {
sh("""apt-get update && apt-get install -y lintian &&
lintian -Ii -E --pedantic --profile=${profile} ${changes}""")
}