I'm building my project as a docker image and pushing it to an on-premise Nexus repository. The trouble is that sometimes the image is pushed with the wrong manifest version. If everything goes right the manifest should be:
application/vnd.docker.distribution.manifest.v2+json
But sometimes it will be:
application/vnd.docker.distribution.manifest.v1+prettyjws
I did search around about this issue and I haven't been able to find much except for this issue on sonatype. However, I find the nature of the problem unpredictable. It seems to me that specifying the manifest version is done automatically. Why is this problem occurring and how can I fix it?