skip to Main Content

I am trying to create an image tag using the below command but I am getting an error:

$ docker tag s1-env-project-data-explorer-ui:latest 111111111111.dkr.ecr.us-east-1.amazonaws.com/s1-env-project-common:s1-env-project-data-explorer-ui:latest

Error parsing reference: "111111111111.dkr.ecr.us-east-1.amazonaws.com/s1-env-project-common:s1-env-project-data-explorer-ui:latest" is not a valid repository/tag: invalid reference format

What am I missing here?

2

Answers


  1. please consider below format

    docker tag <repo_name>:<tag_name> <account_id>.dkr.ecr.us-east-1.amazonaws.com/<repo_name>:<tag_name>
    

    for example:

    docker tag repo1:first_tag 111111111111.dkr.ecr.us-east-1.amazonaws.com/repo1:first_tag
    
    Login or Signup to reply.
  2. A docker tag cannot have a : in it. From the documentation:

    The tag must be valid ASCII and can contain lowercase and uppercase letters, digits, underscores, periods, and hyphens.

    so the following is invalid:

    111111111111.dkr.ecr.us-east-1.amazonaws.com/s1-env-project-common:s1-env-project-data-explorer-ui:latest

    As per your comment, if you are working with two different components, you should certainly have two different ECR repositories.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search