`; resultsHTML += results .map((item) => { return `
${item.meta.title}

…${item.excerpt}…

`; }) .join(""); if (resultsLength > 5) { resultsHTML += ``; } searchBarResults.innerHTML = resultsHTML; } } searchBarInput.addEventListener("input", search); if (window.heap !== undefined) { searchBarResults.addEventListener('click', function (event) { if (event.target.tagName === 'A' && event.target.closest('.link')) { const searchQuery = event.target.getAttribute('data-query'); const resultIndex = event.target.getAttribute('data-index'); const url = new URL(event.target.href); const properties = { docs_search_target_path: url.pathname, docs_search_target_title: event.target.textContent, docs_search_query_text: searchQuery, docs_search_target_index: resultIndex, docs_search_source_path: window.location.pathname, docs_search_source_title: document.title, }; heap.track("Docs - Search - Click - Result Link", properties); } }); } });

Move images between repositories

Consolidating and organizing your Docker images across repositories can streamline your workflows, whether you're managing personal projects or contributing to an organization. This topic explains how to move images between Docker Hub repositories, ensuring that your content remains accessible and organized under the correct accounts or namespaces.

Personal to personal

When consolidating personal repositories, you can pull private images from the initial repository and push them into another repository owned by you. To avoid losing your private images, perform the following steps:

  1. Sign up for a new Docker account with a personal subscription.

  2. Sign in to Docker using your original Docker account

  3. Pull your images:

    $ docker pull namespace1/docker101tutorial
    
  4. Tag your private images with your newly created Docker username, for example:

    $ docker tag namespace1/docker101tutorial new_namespace/docker101tutorial
    
  5. Using docker login from the CLI, sign in with your newly created Docker account, and push your newly tagged private images to your new Docker account namespace:

    $ docker push new_namespace/docker101tutorial
    

The private images that existed in your previous account are now available in your new account.

Personal to an organization

To avoid losing your private images, you can pull your private images from your personal account and push them to an organization that's owned by you.

  1. Navigate to Docker Hub and select Organizations.

  2. Select the applicable organization and verify that your user account is a member of the organization.

  3. Sign in to Docker Hub using your original Docker account, and pull your images:

    $ docker pull namespace1/docker101tutorial
    
  4. Tag your images with your new organization namespace:

    $ docker tag namespace1/docker101tutorial <new_org>/docker101tutorial
    
  5. Push your newly tagged images to your new org namespace:

    $ docker push new_org/docker101tutorial
    

The private images that existed in your user account are now available for your organization.