Last active
November 4, 2021 12:30
-
-
Save ccopsey/5a78d4f301a160f3c95275cbf611602b to your computer and use it in GitHub Desktop.
Docker image name regex (https://regex101.com/r/1hJDEl/1)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
^(?P<name>(?:(?:(?P<hostname>(?=[^:\/]{4,253})(?!-)[a-zA-Z0-9-]{1,63}(?<!-)(?:\.(?!-)[a-zA-Z0-9-]{1,63}(?<!-))*)(?::(?P<port>[0-9]{1,5}))?)/)?(?P<registry>(?![._-])(?:[a-z0-9._-]*)(?<![._-])(?:/(?![._-])[a-z0-9._-]*(?<![._-]))*))(?::(?P<tag>(?![.-])[a-zA-Z0-9_.-]{1,128}))?(?:@sha256:(?P<digest>[a-f0-9]{64}))?$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment