projectatomic / atomic

Atomic Run Tool for installing/running/managing container images.
Other
526 stars 139 forks source link

Question/Bug: atomic push has trouble for image when --atomic type is specified? #1208

Open peterbaouoft opened 6 years ago

peterbaouoft commented 6 years ago

This is migrated from https://bugzilla.redhat.com/show_bug.cgi?id=1549264. When using atomic push -- type atomic image, the user reported

oc tool is required and that you need to be logged into it

I have looked into the logic for pushing atomic type in the code base. It seems like we will default to use skopeo copy if no satillite or pulp option is specified.

            # We must push the file to the registry first prior to performing a
            # local signature because the manifest file must be on the registry
            return_code = util.skopeo_copy(local_image, remote_image, debug=self.args.debug,
                                           policy_filename=self.policy_filename,
                                           sign_by=self.args.sign_by if sign else None, insecure=insecure,
                                           username=self.args.username,
                                           password=self.args.password,
                                           gpghome=self.args.gnupghome)

However, the format of the image and other specific requirements can not be seen easily in a noticeable place. I have checked skopeo documentation about skopeo image format, and did not see explanations for images with atomic: in their documentation. https://github.com/projectatomic/skopeo#skopeo-

I am not very experienced with golang, so it might take long for me to find out why the bugzilla issue happened, and whether or not oc tool is truly required when copying image to atomic registry. I am also not sure if it is the right place to put here since it is related to skopeo(#facepalm).

So before I dive in too much, any suggestions or thoughts about the above bugzilla? Should I file this issue instead to skopeo?@giuseppe. I am happy to write documentation (and need practice too) if needed (after I understand it ofc :p).

giuseppe commented 6 years ago

a check for 'oc' could be added to atomic, but it is probably better to add it directly in Skopeo as skopeo copy can also be used directly without requiring atomic.

@baude what do you think? Should rhbz#1549264 be moved to Skopeo?