Can we create folders in ACR Repository on azure portal ?

J Kumar 0 Reputation points
2025-05-27T12:04:09.71+00:00

Can we create folders within the repository on ACR? For example, my product ABC has components like UI, API, and Notification. I want to create a folder named ABC, with all these components inside it.

Azure Container Registry
Azure Container Registry
An Azure service that provides a registry of Docker and Open Container Initiative images.
511 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Alex Burlachenko 10,255 Reputation points
    2025-05-27T12:25:51.3266667+00:00

    Hi J Kumar,

    u can't literally create folders in acr like u would in a file explorer. BUT )) and this is a big but from caps B ::)) u can simulate folders by using forward slashes in ur image names! it's kinda clever how they designed it.

    when u push an image to acr, u can name it like this "abc/ui:v1" or "abc/api:latest". the portal will then display it like a folder structure even tho technically it's all flat underneath. pretty neat, right? )

    actually microsoft explains this in their docs https://learn.microsoft.com/en-us/azure/container-registry/container-registry-best-practices#repository-namespaces). they call it "repository namespaces" but don't let the fancy term scare u it's just folders by another name ))

    to make ur abc structure, u'd do something like

    build and tag ur ui component as "abc/ui:v1"

    tag ur api as "abc/api:v1"

    push them all to the same registry

    when u look in azure portal later u'll see a collapsible "abc" folder with all ur components inside. the portal even shows little folder icons to make it extra clear )

    if u're using docker, the commands would look like docker tag my-ui-image myacr.azurecr.io/abc/ui:v1 docker push myacr.azurecr.io/abc/ui:v1

    and thanks for asking this on the q&a! it's actually a super common question that trips up lots of folks when they start with acr. the whole "fake folders" thing isn't obvious until u stumble upon it :)

    one last thing while u can nest "folders" multiple levels deep (like "abc/dev/ui:v1"), try not to go too crazy with it.

    Best regards,
    Alex
    and "yes" if you would follow me at Q&A - personaly thx.
    P.S. If my answer help to you, please Accept my answer
    PPS That is my Answer and not a Comment
    https://ctrlaltdel.blog/
    
    0 comments No comments

  2. Stanislav Zhelyazkov 28,426 Reputation points MVP Volunteer Moderator
    2025-05-27T12:26:36.94+00:00

    Hi,

    In general container registry does not have concept like folders as it is not storage service like storage account. You can put artifacts in container registry in different namespaces (like folders). These namespaces if they do not exist are created when you publish artifact to the container registry. When you publish artifact you can provide path which can contain the namespace in which the artifact/image is published. Repository namespaces.

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.