disable with entrypoint
This commit is contained in:
parent
d90cbb8ff4
commit
45d63c2f90
@ -34,6 +34,7 @@ func BuildGolangBin() *cobra.Command {
|
|||||||
},
|
},
|
||||||
BuildPath: "main.go",
|
BuildPath: "main.go",
|
||||||
BinName: "main",
|
BinName: "main",
|
||||||
|
ExecuteOnEntrypoint: true,
|
||||||
}).
|
}).
|
||||||
Execute(ctx)
|
Execute(ctx)
|
||||||
},
|
},
|
||||||
|
@ -25,6 +25,7 @@ type GolangBinOpts struct {
|
|||||||
BuildPath string
|
BuildPath string
|
||||||
BinName string
|
BinName string
|
||||||
BaseImage string
|
BaseImage string
|
||||||
|
ExecuteOnEntrypoint bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *Pipeline) WithGolangBin(opts *GolangBinOpts) *Pipeline {
|
func (p *Pipeline) WithGolangBin(opts *GolangBinOpts) *Pipeline {
|
||||||
@ -85,7 +86,11 @@ func (p *Pipeline) WithGolangBin(opts *GolangBinOpts) *Pipeline {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
if opts.ExecuteOnEntrypoint {
|
||||||
finalImage = c.WithEntrypoint([]string{usrbin})
|
finalImage = c.WithEntrypoint([]string{usrbin})
|
||||||
|
} else {
|
||||||
|
finalImage = c
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user