From 883aea51a3dee4398ec25806afa0bb3c9605696e Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Tue, 14 Aug 2018 12:06:49 +0200 Subject: build, rootless: specify IsolationOCIRootless Signed-off-by: Giuseppe Scrivano Closes: #1269 Approved by: rhatdan --- cmd/podman/build.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cmd/podman') diff --git a/cmd/podman/build.go b/cmd/podman/build.go index b8e586811..c33193882 100644 --- a/cmd/podman/build.go +++ b/cmd/podman/build.go @@ -7,10 +7,12 @@ import ( "strings" "github.com/pkg/errors" + "github.com/projectatomic/buildah" "github.com/projectatomic/buildah/imagebuildah" buildahcli "github.com/projectatomic/buildah/pkg/cli" "github.com/projectatomic/buildah/pkg/parse" "github.com/projectatomic/libpod/cmd/podman/libpodruntime" + "github.com/projectatomic/libpod/pkg/rootless" "github.com/sirupsen/logrus" "github.com/urfave/cli" ) @@ -229,5 +231,9 @@ func buildCmd(c *cli.Context) error { options.ReportWriter = ioutil.Discard } + if rootless.IsRootless() { + options.Isolation = buildah.IsolationOCIRootless + } + return runtime.Build(getContext(), options, dockerfiles...) } -- cgit v1.2.3-54-g00ecf