Commit 6d2d8c6 1 parent 2f63fae commit 6d2d8c6 Copy full SHA for 6d2d8c6
File tree 3 files changed +74
-21
lines changed
3 files changed +74
-21
lines changed Original file line number Diff line number Diff line change 7
7
"fmt"
8
8
"io"
9
9
"os"
10
+ "runtime"
10
11
11
12
"github.com/buildpacks/pack"
12
13
"github.com/buildpacks/pack/logging"
@@ -54,10 +55,20 @@ func (builder *Builder) Build(f bosonFunc.Function) (err error) {
54
55
}
55
56
56
57
// Build options for the pack client.
58
+ var network string
59
+ if runtime .GOOS == "linux" {
60
+ network = "host"
61
+ }
62
+
57
63
packOpts := pack.BuildOptions {
58
64
AppPath : f .Root ,
59
65
Image : f .Image ,
60
66
Builder : packBuilder ,
67
+ DockerHost : os .Getenv ("DOCKER_HOST" ),
68
+ ContainerConfig : struct {
69
+ Network string
70
+ Volumes []string
71
+ }{Network : network , Volumes : nil },
61
72
}
62
73
63
74
// log output is either STDOUt or kept in a buffer to be printed on error.
Original file line number Diff line number Diff line change @@ -3,14 +3,14 @@ module github.com/boson-project/func
3
3
go 1.14
4
4
5
5
require (
6
- github.com/buildpacks/pack v0.16.0
6
+ github.com/buildpacks/pack v0.17.1-0.20210221000942-0c84b4ae7a30
7
7
github.com/markbates/pkger v0.17.1
8
8
github.com/mitchellh/go-homedir v1.1.0
9
9
github.com/ory/viper v1.7.4
10
- github.com/spf13/cobra v1.1.1
11
- gopkg.in/yaml.v2 v2.3 .0
12
- k8s.io/api v0.18.8
13
- k8s.io/apimachinery v0.19.1
10
+ github.com/spf13/cobra v1.1.3
11
+ gopkg.in/yaml.v2 v2.4 .0
12
+ k8s.io/api v0.19.7
13
+ k8s.io/apimachinery v0.19.7
14
14
k8s.io/client-go v11.0.1-0.20190805182717-6502b5e7b1b5+incompatible
15
15
knative.dev/client v0.19.1
16
16
knative.dev/eventing v0.19.0
@@ -20,6 +20,6 @@ require (
20
20
21
21
replace (
22
22
// Nail down k8 deps to align with transisitive deps
23
- k8s.io/apimachinery => k8s.io/apimachinery v0.18.8
24
- k8s.io/client-go => k8s.io/client-go v0.18.8
23
+ k8s.io/apimachinery => k8s.io/apimachinery v0.19.7
24
+ k8s.io/client-go => k8s.io/client-go v0.19.7
25
25
)
You can’t perform that action at this time.
0 commit comments