Don't set network/security mode on stable dockerfile

Signed-off-by: Andy Caldwell <andrew.caldwell@metaswitch.com>
v0.7
Andy Caldwell 2019-08-21 13:08:22 +01:00
parent 2ccafc16b7
commit 113e3133cd
No known key found for this signature in database
GPG Key ID: D4204541AC1D228D
3 changed files with 5 additions and 5 deletions

View File

@ -644,7 +644,9 @@ func dispatchRun(d *dispatchState, c *instructions.RunCommand, proxy *llb.ProxyE
if err != nil {
return err
}
opt = append(opt, securityOpt)
if securityOpt != nil {
opt = append(opt, securityOpt)
}
networkOpt, err := dispatchRunNetwork(c)
if err != nil {

View File

@ -5,9 +5,8 @@ package dockerfile2llb
import (
"github.com/moby/buildkit/client/llb"
"github.com/moby/buildkit/frontend/dockerfile/instructions"
"github.com/moby/buildkit/solver/pb"
)
func dispatchRunNetwork(c *instructions.RunCommand) (llb.RunOption, error) {
return llb.Network(pb.NetMode_UNSET), nil
return nil, nil
}

View File

@ -5,9 +5,8 @@ package dockerfile2llb
import (
"github.com/moby/buildkit/client/llb"
"github.com/moby/buildkit/frontend/dockerfile/instructions"
"github.com/moby/buildkit/solver/pb"
)
func dispatchRunSecurity(c *instructions.RunCommand) (llb.RunOption, error) {
return llb.Security(pb.SecurityMode_SANDBOX), nil
return nil, nil
}