#210: Fixed hostmode docker builds
This commit is contained in:
@@ -181,11 +181,11 @@ func buildImageMemory(fs billy.Filesystem, tags []string, dockerfileFolder strin
|
|||||||
// Dockerfile is inside the TAR itself. Not local context
|
// Dockerfile is inside the TAR itself. Not local context
|
||||||
// docker build --build-arg http_proxy=http://my.proxy.url
|
// docker build --build-arg http_proxy=http://my.proxy.url
|
||||||
buildOptions := types.ImageBuildOptions{
|
buildOptions := types.ImageBuildOptions{
|
||||||
Remove: true,
|
Remove: true,
|
||||||
Tags: tags,
|
Tags: tags,
|
||||||
BuildArgs: map[string]*string{},
|
BuildArgs: map[string]*string{},
|
||||||
NetworkMode: "host",
|
|
||||||
}
|
}
|
||||||
|
// NetworkMode: "host",
|
||||||
|
|
||||||
httpProxy := os.Getenv("HTTP_PROXY")
|
httpProxy := os.Getenv("HTTP_PROXY")
|
||||||
if len(httpProxy) > 0 {
|
if len(httpProxy) > 0 {
|
||||||
@@ -244,11 +244,11 @@ func buildImage(tags []string, dockerfileFolder string) error {
|
|||||||
|
|
||||||
dockerFileTarReader := bytes.NewReader(buf.Bytes())
|
dockerFileTarReader := bytes.NewReader(buf.Bytes())
|
||||||
buildOptions := types.ImageBuildOptions{
|
buildOptions := types.ImageBuildOptions{
|
||||||
Remove: true,
|
Remove: true,
|
||||||
Tags: tags,
|
Tags: tags,
|
||||||
BuildArgs: map[string]*string{},
|
BuildArgs: map[string]*string{},
|
||||||
NetworkMode: "host",
|
|
||||||
}
|
}
|
||||||
|
//NetworkMode: "host",
|
||||||
|
|
||||||
httpProxy := os.Getenv("HTTP_PROXY")
|
httpProxy := os.Getenv("HTTP_PROXY")
|
||||||
if len(httpProxy) > 0 {
|
if len(httpProxy) > 0 {
|
||||||
|
|||||||
Reference in New Issue
Block a user