summaryrefslogtreecommitdiff
path: root/cmd/podman/build.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/build.go')
-rw-r--r--cmd/podman/build.go6
1 files changed, 6 insertions, 0 deletions
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...)
}