@@ -23,19 +23,13 @@ import (
2323 "golang.org/x/sync/semaphore"
2424)
2525
26- func (i * ImageService ) PushImage (ctx context.Context , targetRef reference.Named , metaHeaders map [string ][]string , authConfig * registry.AuthConfig , outStream io.Writer ) error {
27- // TODO: Expose in API
28- var platform * ocispec.Platform
29- return i .pushImage (ctx , targetRef , platform , metaHeaders , authConfig , outStream )
30- }
31-
3226// PushImage initiates a push operation of the image pointed to by targetRef.
3327//
3428// If image points to an index/manifest list and platform is specified, then only
3529// a matching platform manifest is pushed.
3630// Otherwise index is pushed as is, which will probably fail if you don't have all
3731// content referenced by the index. Cross-repo mounts will be attempted for non-existing blobs.
38- func (i * ImageService ) pushImage (ctx context.Context , targetRef reference.Named , optPlatform * ocispec.Platform , metaHeaders map [string ][]string , authConfig * registry.AuthConfig , outStream io.Writer ) error {
32+ func (i * ImageService ) PushImage (ctx context.Context , targetRef reference.Named , optPlatform * ocispec.Platform , metaHeaders map [string ][]string , authConfig * registry.AuthConfig , outStream io.Writer ) error {
3933 if _ , ok := targetRef .(reference.Tagged ); ! ok {
4034 return errdefs .NotImplemented (errors .New ("push all tags is not implemented" ))
4135 }
@@ -150,7 +144,8 @@ func (i *ImageService) pushImage(ctx context.Context, targetRef reference.Named,
150144 "Note: You're trying to push a manifest list/index which " +
151145 "references multiple platform specific manifests, but not all of them are available locally " +
152146 "or available to the remote repository.\n " +
153- "Make sure you have all the referenced content and try again." ,
147+ "Make sure you have all the referenced content and try again." +
148+ "Alternatively you can push a single platform specific manifest by specifying the platform.\n " ,
154149 err ))
155150 }
156151 }
0 commit comments