func (ubs usingBuilderState) withConfig(l *lua.State) int { oldImageID := ubs.Config.Image ubs.Config = translator.ParseImageConfigFromLuaTable(l) if ubs.Config.Image != "" { ilog.Warn.Logf("Overwriting the image set in .using() in .withConfig() is discouraged") } else { ubs.Config.Image = oldImageID } return ubs.usingTable(l) }
// withConfig sets the config for the new image. func (wbs wrapBuilderState) withConfig(l *lua.State) int { wbs.Config = translator.ParseImageConfigFromLuaTable(l) return wbs.wrapTable(l) }