// NewImageService returns a new instance of the Docker Image Service with the given authentication providers
NewImageService returns a new instance of the Docker Image Service with the given authentication providers
// NewImageService returns a new instance of the Docker Image Service with the given authentication providers
func NewImageService(authProviders map[string]dockerregistryproxyv1.AuthenticationProviderAPIClient) (*ImageService, error) {
	client, err := dockerclient.NewClientWithOpts()
	if err != nil {
		return nil, fmt.Errorf("could not create new docker client: %w", err)
	}
	if err := dockerclient.FromEnv(client); err != nil {
		return nil, fmt.Errorf("could not configure docker client from environment: %w", err)
	}
	return &ImageService{
		client:        client,
		authProviders: authProviders,
	}, nil
}
func NewImageService ( authProviders map [ string ] dockerregistryproxyv1 . AuthenticationProviderAPIClient ) ( * ImageService , error ) { client , err := dockerclient . NewClientWithOpts ( ) if err != nil { return nil , fmt . Errorf ( " " , err ) } if err := dockerclient . FromEnv ( client ) ; err != nil { return nil , fmt . Errorf ( " " , err ) } return & ImageService { client : client , authProviders : authProviders , } , nil }
NewImageService returns a new instance of the Docker Image Service with the given authentication providers
NewImageService returns a new instance of the Docker Image Service with the given authentication providers