Can we use curl command to push/pull docker image to nexus 3 repository

  curl, docker

I have a requirement to push/pull docker image to/from nexus 3 repository. Can we use curl commands for this activity.
As docker installation is not allowed by our Infra team we have to find a alternate way to achieve this.

I have tried below curl commands to pull and push image respectively. Please correct me if this is correct way.
While downloading image I don’t get any error.
But while uploading, my requirement is to create a new folder(foldername is my project name) inside docker repository (pre-existing) and inside this I have to upload the image.

Downloading the docker image
curl -u uname:password -O https://nexusURL/dockerimagename

Uploading image
curl -u uname:password --ftp-create-dirs -T dockerimagename https://nexusURL/<newfoldername_to_be_created>/
Error while uploading
<h2>HTTP ERROR: 400</h2>
<p>Problem accessing /FRAI/v2/anna/orchestrator/manifests/v1.10.12. Reason:
<pre>    Not a Docker request</pre></p>
<hr /><a href="">Powered by Jetty:// 9.3.7.v20160115</a><hr/>

The ideal output after upload should be


Source: StackOverflow