func containerImageRepository(containerImage string) string {
	parts := urlRegex.FindAllStringSubmatch(containerImage, -1)
	if len(parts) > 0 && len(parts[0]) > 3 {
		return parts[0][3]
	}
	return ""
}
Gets the repository part of the container image url
package awsbatch
import (
	"context"
	"regexp"
	"github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core"
	pluginErrors "github.com/flyteorg/flyteplugins/go/tasks/errors"
	"github.com/flyteorg/flyteplugins/go/tasks/plugins/array/awsbatch/config"
	arrayCore "github.com/flyteorg/flyteplugins/go/tasks/plugins/array/core"
	awsUtils "github.com/flyteorg/flyteplugins/go/tasks/plugins/awsutils"
	"github.com/flyteorg/flytestdlib/errors"
	"github.com/flyteorg/flytestdlib/logger"
	pluginCore "github.com/flyteorg/flyteplugins/go/tasks/pluginmachinery/core"
	"github.com/flyteorg/flyteplugins/go/tasks/plugins/array/awsbatch/definition"
)
func getContainerImage(_ context.Context, task *core.TaskTemplate) string {
	if task.GetContainer() != nil && len(task.GetContainer().Image) > 0 {
		return task.GetContainer().Image
	}
	return ""
}
var urlRegex = regexp.MustCompile(`^(?:([^/]+)/)?(?:([^/]+)/)*?([^@:/]+)(?:[@:][^/]+)?$`)