6

Had an issue with not being able to push or pull from an AWS ECR registry with the following cryptic error:

error parsing HTTP 404 response body: invalid character 'p' after top-level value: "404 page not found\n"

Several hours of googling indicated it was a protocol issue. It turns out the image name:

xxxxxxxxxxxx.dkr.ecr.us-east-1.amazonaws.com/snowshu__test

was the issue: AWS ECR errors when the image name contains double underscores.

This contradicts ECR naming documentation.

EthanK
  • 600
  • 5
  • 17

2 Answers2

4

You cannot have two underscores next to each other in a repository name.

As per the Docker Registry API:

A component of a repository name must be at least one lowercase, alpha-numeric characters, optionally separated by periods, dashes or underscores. More strictly, it must match the regular expression [a-z0-9]+(?:[._-][a-z0-9]+)*.

Richard Nguyen
  • 1,203
  • 8
  • 18
  • 2
    Good find. Lots of layers of obfuscation here between ECR to evaluating regex in the docker api docs, feel like this could be bubbled up a little cleaner somewhere personally. – EthanK Feb 17 '20 at 13:14
1

Renaming the image to

xxxxxxxxxxxx.dkr.ecr.us-east-1.amazonaws.com/snowshu_test

solved the issue.

EthanK
  • 600
  • 5
  • 17