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.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/cmd/podman/build.go b/cmd/podman/build.go
index b8e586811..e35fd10a4 100644
--- a/cmd/podman/build.go
+++ b/cmd/podman/build.go
@@ -6,11 +6,13 @@ import (
"path/filepath"
"strings"
+ "github.com/containers/libpod/cmd/podman/libpodruntime"
+ "github.com/containers/libpod/pkg/rootless"
"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/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...)
}