Set default home value (#281)

* Set default home value

* Apply  default home value based on user for run commands

* rename default home function
This commit is contained in:
priyawadhwa
2018-08-10 12:58:07 -07:00
committed by GitHub
parent 52e9863810
commit 4e77fa000d
8 changed files with 120 additions and 8 deletions
+1 -5
View File
@@ -30,7 +30,6 @@ import (
"github.com/google/go-containerregistry/pkg/authn/k8schain"
"github.com/google/go-containerregistry/pkg/name"
"github.com/google/go-containerregistry/pkg/v1"
"github.com/google/go-containerregistry/pkg/v1/empty"
"github.com/google/go-containerregistry/pkg/v1/mutate"
"github.com/google/go-containerregistry/pkg/v1/remote"
"github.com/google/go-containerregistry/pkg/v1/tarball"
@@ -83,10 +82,7 @@ func DoBuild(k KanikoBuildArgs) (v1.Image, error) {
if err := snapshotter.Init(); err != nil {
return nil, err
}
imageConfig, err := sourceImage.ConfigFile()
if sourceImage == empty.Image {
imageConfig.Config.Env = constants.ScratchEnvVars
}
imageConfig, err := util.RetrieveConfigFile(sourceImage)
if err != nil {
return nil, err
}