title: how to tag image in docker registry v2
body: <p>We have logic in our CI-CD that tags (via REST) staging image to <code>latest</code> (if tests are successful). This worked on registry v1.</p>
  <p>We now moved to v2 api, and I can't find documentation on how to &quot;add&quot; tags to existing image in registry. I'm in a step that can bring the &quot;manifest&quot; of some staging image, but not sure how to add tag and POST it via http.</p>
  <p>I tried to send the following inputs:</p>
  <ol>
  <li><code>&quot;tag&quot;: &quot;staging&quot;,&quot;latest&quot;,</code></li>
  <li><code>&quot;tag&quot;: [&quot;staging&quot;,&quot;latest&quot;],</code> and more</li>
  </ol>
  <pre class="lang-json prettyprint-override"><code>{
      &quot;schemaVersion&quot;: 1,
      &quot;name&quot;: &quot;configservice&quot;,
      &quot;tag&quot;: &quot;staging&quot;,
      &quot;architecture&quot;: &quot;amd64&quot;,
      &quot;fsLayers&quot;: [...
  </code></pre>