2017-03-28 15:06:13 +08:00
|
|
|
package imagebuildah
|
|
|
|
|
|
|
|
import (
|
2018-09-18 03:20:16 +08:00
|
|
|
"github.com/containers/buildah"
|
2017-03-28 15:06:13 +08:00
|
|
|
)
|
|
|
|
|
2017-04-11 22:27:05 +08:00
|
|
|
// InitReexec is a wrapper for buildah.InitReexec(). It should be called at
|
|
|
|
// the start of main(), and if it returns true, main() should return
|
2021-07-21 04:23:25 +08:00
|
|
|
// successfully immediately.
|
2017-04-11 22:27:05 +08:00
|
|
|
func InitReexec() bool {
|
|
|
|
return buildah.InitReexec()
|
|
|
|
}
|
2022-05-02 13:07:50 +08:00
|
|
|
|
|
|
|
// argsMapToSlice returns the contents of a map[string]string as a slice of keys
|
|
|
|
// and values joined with "=".
|
|
|
|
func argsMapToSlice(m map[string]string) []string {
|
|
|
|
s := make([]string, 0, len(m))
|
|
|
|
for k, v := range m {
|
|
|
|
s = append(s, k+"="+v)
|
|
|
|
}
|
|
|
|
return s
|
|
|
|
}
|