JamieMagee.DockerReference
is a .NET port of Docker's image reference library.
dotnet add package JamieMagee.DockerReference
There are five different reference types:
-
Contains: domain, repository, and digest. For example
docker.io/library/hello-world@sha256:10d7d58d5ebd2a652f4d93fdd86da8f265f5318c6a73cc5b6a9798ff6d2b2e67
-
Contains: digest. For example
sha256:10d7d58d5ebd2a652f4d93fdd86da8f265f5318c6a73cc5b6a9798ff6d2b2e67
-
Contains: domain, repository, tag, and digest. For example
docker.io/library/hello-world:latest@sha256:10d7d58d5ebd2a652f4d93fdd86da8f265f5318c6a73cc5b6a9798ff6d2b2e67
-
Contains: domain and repository. For example
docker.io/library/hello-world
-
Contains: domain, repository, and tag. For example
docker.io/library/hello-world:latest
There are three different parsers
-
ParseQualifiedName
Used when parsing a string representing a fully-qualified image name (an image name that contains at least a domain and a repository).
-
ParseFamiliarName
Used when parsing a string representing a familiar image name (an image that may not contain a domain). If a domain isn't specified, the default domain
docker.io
is used. If the domain isdocker.io
and the repository contains only one part, the repository is prefixed withlibrary/
-
ParseAll
Used when parsing a string representing a familiar image name or digest identifier.
All packages in this repository are licensed under the MIT license.