<p>I have 2 images on Docker Hub. <br/> What's my source URLs for images on Docker Hub? <br/> I need to import image to ACR but I couldn't find my <strong>source URLs</strong>.</p>
<p>My images on Docker Hub. for example;  <br />
- mocdoc/myapplicationrepo:driver-ui  <br/>
- mocdoc/myapplicationrepo:driver-api</p>
<p>what is my <strong>image_source_url on Docker Hub?</strong> command below;  <br /></p>
<p>Here my code for importing to ACR <br /></p>
<pre><code>az acr import –name myapp –source &lt;image_source_url&gt; –image &lt;image_name&gt;
</code></pre>

<p>From <a href="https://learn.microsoft.com/en-us/azure/container-registry/container-registry-import-images#import-from-docker-hub" rel="nofollow noreferrer">Import from Docker Hub</a>:</p>
<blockquote>
<p>For example, use the az acr import command to import the
multi-architecture hello-world:latest image from Docker Hub to a
registry named myregistry. Because hello-world is an official image
from Docker Hub, this image is in the default library repository.
<strong>Include the repository name and optionally a tag in the value of the
--source image parameter.</strong> (You can optionally identify an image by its manifest digest instead of by tag, which guarantees a particular
version of an image.)</p>
</blockquote>
<pre><code>az acr import \
  --name myregistry \
  --source docker.io/library/hello-world:latest \
  --image hello-world:latest
</code></pre>
<p>From <a href="https://learn.microsoft.com/en-us/cli/azure/acr?view=azure-cli-latest#az_acr_import-examples" rel="nofollow noreferrer">az acr import examples</a>:</p>
<blockquote>
<p>Import an image from a public repository on Docker Hub. The image uses
the specified repository and tag names.</p>
</blockquote>
<pre><code>az acr import -n MyRegistry --source docker.io/library/hello-world:latest -t targetrepository:targettag
</code></pre>
<blockquote>
<p>Import an image from a private repository using its username and
password. This also applies to registries outside Azure.</p>
</blockquote>
<pre><code>az acr import -n MyRegistry --source myprivateregistry.azurecr.io/hello-world:latest -u username -p password
</code></pre>
<p>In addition you can find  more information in <a href="https://github.com/Azure/acr/issues/476" rel="nofollow noreferrer">Unable to Import public Docker image</a> dockerhub issue:</p>
<p>Answer on your question depends on few factors, e.g if it official image, public/private repository and presence of authentication.</p>
<pre><code>To summarize:

--source docker.io/library/python creates a &quot;library/python&quot; repository at the ACR end.
--source docker.io/python fails with same error as &quot;docker.io/library/axoniq/axonserver:latest&quot; -&gt; authentication required
--source docker.io/library/hello-world:latest creates a &quot;hello-world&quot; repository at the ACR end (leaving out &quot;library/&quot;).
--source docker.io/library/axoniq/axonserver:latest fails
--source docker.io/axoniq/axonserver:latest works
</code></pre>
<p>If the image is in the library repository (<a href="https://hub.docker.com/u/library" rel="nofollow noreferrer">https://hub.docker.com/u/library</a>) then library is needed. If you have your own repository, then <code>library</code> is not needed..</p>
<p>I would say your version is</p>
<p><code>az acr import --source docker.io/mocdoc/myapplicationrepo:driver-ui</code> , but you need to test according what you currently have.</p>
